Skip to content

Commit

Permalink
Fix segfault in zend_destroy_rsrc_list
Browse files Browse the repository at this point in the history
  • Loading branch information
yatsukhnenko committed Oct 6, 2019
1 parent ee56458 commit 7c6c43a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ redis_sock_get_connection_pool(RedisSock *redis_sock)
res.type = le_redis_pconnect;
res.ptr = p;
le = &res;
zend_hash_update_mem(&EG(persistent_list), persistent_id, le, sizeof(*le));
zend_hash_str_update_mem(&EG(persistent_list), ZSTR_VAL(persistent_id), ZSTR_LEN(persistent_id), le, sizeof(*le));
#else
le = zend_register_persistent_resource_ex(persistent_id, p, le_redis_pconnect);
le = zend_register_persistent_resource(ZSTR_VAL(persistent_id), ZSTR_LEN(persistent_id), p, le_redis_pconnect);
#endif
}
zend_string_release(persistent_id);
Expand Down

0 comments on commit 7c6c43a

Please sign in to comment.