Skip to content

Commit 5d8839f

Browse files
committed
Fixed small leak with info().
Thanks to @kotas for reporting and @chobie for fixing. This closes GitHub issue phpredis#125.
1 parent 43571d1 commit 5d8839f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

library.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -475,9 +475,7 @@ PHPAPI void redis_info_response(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_s
475475
IF_MULTI_OR_PIPELINE() {
476476
add_next_index_zval(z_tab, z_multi_result);
477477
} else {
478-
*return_value = *z_multi_result;
479-
zval_copy_ctor(return_value);
480-
efree(z_multi_result);
478+
RETVAL_ZVAL(z_multi_result, 0, 1);
481479
}
482480
}
483481

0 commit comments

Comments
 (0)