diff options
author | michael-grunder <michael.grunder@gmail.com> | 2015-12-21 22:08:28 +0300 |
---|---|---|
committer | michael-grunder <michael.grunder@gmail.com> | 2015-12-21 22:08:28 +0300 |
commit | bfbdaa9c0a7757a6142becc88cbf05e9ba785bac (patch) | |
tree | 9d415b9bd14dc377ac0efdd27c64c76e47ac6329 | |
parent | f4f59595f02ee5871ca3aae5ca58323e17e8eb3d (diff) |
Fix leak in get response
PHP 7 has done away with the third argument to RETURN_STRINGL
(where one could decide if the string was to be duplicated or not)
meaning that we now need to free our response as RETVAL_STRINGL
will duplicate the string.
I'm not sure what the proper solution is for this in php7
-rw-r--r-- | library.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1407,7 +1407,8 @@ PHP_REDIS_API void redis_string_response(INTERNAL_FUNCTION_PARAMETERS, RedisSock if(redis_unserialize(redis_sock, response, response_len, return_value TSRMLS_CC) == 0) { - RETURN_STRINGL(response, response_len); + RETVAL_STRINGL(response, response_len); + efree(response); } else { efree(response); } |