diff options
author | Michael Grunder <michael.grunder@gmail.com> | 2018-11-22 22:37:18 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-22 22:37:18 +0300 |
commit | 91bd7426d539f48900ed545a105c78f02b1927b8 (patch) | |
tree | b5e73ddda8093ff7ad04235b69a82b240be4ff85 /cluster_library.c | |
parent | 9d1bdb7fd3c653b32db7d88c2467ffa842e6ba82 (diff) |
Masters info leakfix (#1462)
Fix for memory leaks in `RedisCluster->_masters()` and `RedisCluster->info()`
Diffstat (limited to 'cluster_library.c')
-rw-r--r-- | cluster_library.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cluster_library.c b/cluster_library.c index efda062a..780c3615 100644 --- a/cluster_library.c +++ b/cluster_library.c @@ -2072,12 +2072,13 @@ PHP_REDIS_API void cluster_info_resp(INTERNAL_FUNCTION_PARAMETERS, redisCluster } /* Parse response, free memory */ + REDIS_MAKE_STD_ZVAL(z_result); redis_parse_info_response(info, z_result); efree(info); // Return our array if (CLUSTER_IS_ATOMIC(c)) { - RETVAL_ZVAL(z_result, 1, 0); + RETVAL_ZVAL(z_result, 0, 1); } else { add_next_index_zval(&c->multi_resp, z_result); } |