Skip to content

Commit 97c9edc

Browse files
Sorted a memory leak in RedisArray and retabbed unit tests
1 parent 7ef7d07 commit 97c9edc

File tree

4 files changed

+459
-472
lines changed

4 files changed

+459
-472
lines changed

redis_array_impl.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,7 @@ ra_find_node(RedisArray *ra, const char *key, int key_len, int *out_pos TSRMLS_D
461461
efree(out);
462462
return NULL;
463463
}
464+
efree(out);
464465
} else {
465466
/* hash */
466467
hash = rcrc32(out, out_len);
@@ -1019,7 +1020,6 @@ ra_move_string(const char *key, int key_len, zval *z_from, zval *z_to, long ttl
10191020

10201021
static zend_bool
10211022
ra_move_hash(const char *key, int key_len, zval *z_from, zval *z_to, long ttl TSRMLS_DC) {
1022-
10231023
zval z_fun_hgetall, z_fun_hmset, z_ret, z_ret_dest, *z_args[2];
10241024

10251025
/* run HGETALL on source */
@@ -1266,7 +1266,6 @@ ra_rehash_server(RedisArray *ra, zval *z_redis, const char *hostname, zend_bool
12661266

12671267
void
12681268
ra_rehash(RedisArray *ra, zend_fcall_info *z_cb, zend_fcall_info_cache *z_cb_cache TSRMLS_DC) {
1269-
12701269
int i;
12711270

12721271
/* redistribute the data, server by server. */

0 commit comments

Comments
 (0)