summaryrefslogtreecommitdiff
path: root/src/sort.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2015-09-04 10:09:32 +0200
committerantirez <antirez@gmail.com>2015-10-01 13:02:24 +0200
commit34e489cb8cee04b52b5cbbfe53280ad8419d0a96 (patch)
treedcae8c46004249eb22109f2b773da448ea6d1f8f /src/sort.c
parenta7c5be18a81c120b4bdeb139072f27c899fe1a4d (diff)
downloadredis-34e489cb8cee04b52b5cbbfe53280ad8419d0a96.tar.gz
SORT memory leak fixed.
Diffstat (limited to 'src/sort.c')
-rw-r--r--src/sort.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sort.c b/src/sort.c
index 536302bda..788f73a59 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -579,9 +579,9 @@ void sortCommand(client *c) {
}
/* Cleanup */
- if (sortval->type == OBJ_LIST || sortval->type == OBJ_SET)
- for (j = 0; j < vectorlen; j++)
- decrRefCount(vector[j].obj);
+ for (j = 0; j < vectorlen; j++)
+ decrRefCount(vector[j].obj);
+
decrRefCount(sortval);
listRelease(operations);
for (j = 0; j < vectorlen; j++) {