X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/e002ec6801f41d29e1038f687b52dfe6c7fc9c8a..c8a10631d14dfad768b0b924e8dfb240af858dcb:/src/object.c diff --git a/src/object.c b/src/object.c index 7abecfc6..51582619 100644 --- a/src/object.c +++ b/src/object.c @@ -179,6 +179,7 @@ void decrRefCount(void *obj) { case REDIS_HASH: freeHashObject(o); break; default: redisPanic("Unknown object type"); break; } + o->ptr = NULL; /* defensive programming. We'll see NULL in traces. */ if (server.vm_enabled) pthread_mutex_lock(&server.obj_freelist_mutex); if (listLength(server.objfreelist) > REDIS_OBJFREELIST_MAX || !listAddNodeHead(server.objfreelist,o))