Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/ds/ds_htable.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,11 @@ static uint32_t get_object_hash(zval *obj)
case IS_DOUBLE:
return get_double_hash(&hash);

case IS_STRING:
return get_string_zval_hash(&hash);
case IS_STRING: {
uint32_t ret = get_string_zval_hash(&hash);
zval_ptr_dtor_str(&hash);
return ret;
}

case IS_TRUE:
return 1;
Expand All @@ -292,6 +295,7 @@ static uint32_t get_object_hash(zval *obj)

default:
OBJ_HASH_MUST_BE_SCALAR(&hash);
zval_ptr_dtor(&hash);
return 0;
}
}
Expand Down
Loading