diff options
author | antirez <antirez@metal.(none)> | 2011-05-13 11:42:02 +0200 |
---|---|---|
committer | antirez <antirez@metal.(none)> | 2011-05-13 11:42:02 +0200 |
commit | cc8a0f898b0aa881064da23dba23f183b13e3195 (patch) | |
tree | 77895b31865648f89522b2701ab2850aaef9a2ff | |
parent | cd128d2882df2b1354e71075e96737032c41ea8f (diff) | |
download | redis-cc8a0f898b0aa881064da23dba23f183b13e3195.tar.gz |
Fix for DEBUG DIGEST, key may expire on lookup
-rw-r--r-- | src/debug.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/debug.c b/src/debug.c index 16ca27a17..30ae08e60 100644 --- a/src/debug.c +++ b/src/debug.c @@ -101,6 +101,11 @@ void computeDatasetDigest(unsigned char *final) { /* Make sure the key is loaded if VM is active */ o = lookupKeyRead(db,keyobj); + if (o == NULL) { + /* Key expired on lookup? Try the next one. */ + decrRefCount(keyobj); + continue; + } aux = htonl(o->type); mixDigest(digest,&aux,sizeof(aux)); |