semian 0.28.0 → 0.28.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c6423964e3bf474c3f1c6c31ab4c52a14fc28a35d51d91480c537f46f0c1e5f2
4
- data.tar.gz: a7ec4ad1154ceef88bdb3dd2bbd40d419d8dc3162a81a17804afdd9573d380be
3
+ metadata.gz: c31bef07157ffec7aeb634db462f832595897cf1fd562771fca73021e1757274
4
+ data.tar.gz: e8d8f487a8696445beff26e6924b2672b247f57c959141be8825f2bec10969e7
5
5
  SHA512:
6
- metadata.gz: ccc4f1217740efde74e84acf26c2f73de7ac9c088575ac03d7be5408bc1c2711cd95ffd27a9b524071db95de3ce24ad3673b5a4f960a4d96b6b6c1c083c85183
7
- data.tar.gz: 1f94bc2139a6397ba5a963a230496ab694f98cb1ae29e42b69017972d2268afc97c8fdde0d49ffd8d6514036199c15a5d62f67439a6790ed9d4696771ddf7b8e
6
+ metadata.gz: a213874d4a487b36b672b2ddc5a6de6dc4959fb291931c93f0e365cb709de9af1e04756ae314d40a4d74ea6b50a96527aecab1ce77aee692f423ca5f1c17236d
7
+ data.tar.gz: 8995c32426a6f817367ba642c7b780cdf367089b86105485a31f4ca001448ecbb3295844373ebe369de65f271abd83b9afbe0b1ab5ebdd175fc90dfe8c5fed3c
@@ -234,7 +234,7 @@ semian_resource_initialize(VALUE self, VALUE id, VALUE tickets, VALUE quota, VAL
234
234
 
235
235
  // Populate struct fields
236
236
  ms_to_timespec(c_timeout * 1000, &res->timeout);
237
- res->name = strdup(c_id_str);
237
+ res->name = ruby_strdup(c_id_str);
238
238
  res->quota = c_quota;
239
239
  res->wait_time = -1;
240
240
 
@@ -370,11 +370,18 @@ static void
370
370
  semian_resource_free(void *ptr)
371
371
  {
372
372
  semian_resource_t *res = (semian_resource_t *) ptr;
373
+
373
374
  if (res->name) {
374
- free(res->name);
375
+ xfree(res->name); // ruby_strdup
375
376
  res->name = NULL;
376
377
  }
377
- xfree(res);
378
+
379
+ if (res->strkey) {
380
+ free(res->strkey); // malloc
381
+ res->strkey = NULL;
382
+ }
383
+
384
+ xfree(res); // TypedData_Make_Struct
378
385
  }
379
386
 
380
387
  static size_t
@@ -29,7 +29,7 @@ module Semian
29
29
  circuit_breaker.pid_controller_update
30
30
  end
31
31
  rescue => e
32
- Semian.logger&.warn("[#{@name}] PID controller update thread error: #{e.message}")
32
+ Semian.logger&.warn("PID controller update thread error: #{e.message}")
33
33
  end
34
34
  end
35
35
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Semian
4
- VERSION = "0.28.0"
4
+ VERSION = "0.28.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: semian
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.28.0
4
+ version: 0.28.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Francis
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  - !ruby/object:Gem::Version
101
101
  version: '0'
102
102
  requirements: []
103
- rubygems_version: 4.0.8
103
+ rubygems_version: 4.0.11
104
104
  specification_version: 4
105
105
  summary: Bulkheading for Ruby with SysV semaphores
106
106
  test_files: []