Skip to content

Commit

Permalink
Fix RedisCluster keys memory leak (#1466)
Browse files Browse the repository at this point in the history
Free redis response since adding it to our array duplicates the data
anyway.

Addresses #1460
  • Loading branch information
michael-grunder committed Nov 25, 2018
1 parent ae25be2 commit 3b56b7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion redis_cluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,7 @@ PHP_METHOD(RedisCluster, keys) {
}

/* Free response, don't free data */
cluster_free_reply(resp, 0);
cluster_free_reply(resp, 1);
} ZEND_HASH_FOREACH_END();

efree(cmd);
Expand Down

0 comments on commit 3b56b7d

Please sign in to comment.