Commit bad7d097 authored by antirez's avatar antirez
Browse files

fixed a memory leak in the new Set code

parent 5f19e8a4
...@@ -714,6 +714,8 @@ robj *rdbLoadObject(int type, FILE *fp) { ...@@ -714,6 +714,8 @@ robj *rdbLoadObject(int type, FILE *fp) {
* to regular hashtable encoded set */ * to regular hashtable encoded set */
if (o->encoding == REDIS_ENCODING_HT) { if (o->encoding == REDIS_ENCODING_HT) {
dictAdd((dict*)o->ptr,ele,NULL); dictAdd((dict*)o->ptr,ele,NULL);
} else {
decrRefCount(ele);
} }
} }
} else if (type == REDIS_ZSET) { } else if (type == REDIS_ZSET) {
......
...@@ -11,7 +11,7 @@ source tests/support/util.tcl ...@@ -11,7 +11,7 @@ source tests/support/util.tcl
set ::host 127.0.0.1 set ::host 127.0.0.1
set ::port 16379 set ::port 16379
set ::traceleaks 0 set ::traceleaks 1
set ::valgrind 0 set ::valgrind 0
set ::denytags {} set ::denytags {}
set ::allowtags {} set ::allowtags {}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment