Skip to content

Commit b2cffff

Browse files
committed
Fix memory leak in rediscluster session handler
1 parent afcb303 commit b2cffff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

redis_session.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,7 @@ PS_OPEN_FUNC(rediscluster) {
907907

908908
#define CLUSTER_SESSION_CLEANUP() \
909909
if (hash) zend_string_release(hash); \
910+
if (failstr) zend_string_release(failstr); \
910911
if (prefix) zend_string_release(prefix); \
911912
if (user) zend_string_release(user); \
912913
if (pass) zend_string_release(pass); \
@@ -918,7 +919,6 @@ PS_OPEN_FUNC(rediscluster) {
918919
if (seeds == NULL) {
919920
php_error_docref(NULL, E_WARNING, "No valid seeds detected");
920921
CLUSTER_SESSION_CLEANUP();
921-
zval_dtor(&z_conf);
922922
return FAILURE;
923923
}
924924

0 commit comments

Comments
 (0)