We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4a62484 + b139fba commit ce8b468Copy full SHA for ce8b468
src/ds/ds_htable.c
@@ -280,8 +280,11 @@ static uint32_t get_object_hash(zval *obj)
280
case IS_DOUBLE:
281
return get_double_hash(&hash);
282
283
- case IS_STRING:
284
- return get_string_zval_hash(&hash);
+ case IS_STRING: {
+ uint32_t ret = get_string_zval_hash(&hash);
285
+ zval_ptr_dtor_str(&hash);
286
+ return ret;
287
+ }
288
289
case IS_TRUE:
290
return 1;
@@ -292,6 +295,7 @@ static uint32_t get_object_hash(zval *obj)
292
295
293
296
default:
294
297
OBJ_HASH_MUST_BE_SCALAR(&hash);
298
+ zval_ptr_dtor(&hash);
299
return 0;
300
}
301
0 commit comments