fixed a memory leak in the new Set code

This commit is contained in:
antirez 2010-08-26 13:18:24 +02:00
parent 5f19e8a4a5
commit bad7d097e9
2 changed files with 3 additions and 1 deletions

View File

@ -714,6 +714,8 @@ robj *rdbLoadObject(int type, FILE *fp) {
* to regular hashtable encoded set */
if (o->encoding == REDIS_ENCODING_HT) {
dictAdd((dict*)o->ptr,ele,NULL);
} else {
decrRefCount(ele);
}
}
} else if (type == REDIS_ZSET) {

View File

@ -11,7 +11,7 @@ source tests/support/util.tcl
set ::host 127.0.0.1
set ::port 16379
set ::traceleaks 0
set ::traceleaks 1
set ::valgrind 0
set ::denytags {}
set ::allowtags {}