Skip to content

Commit

Permalink
Fix for DEBUG DIGEST, key may expire on lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
antirez committed May 13, 2011
1 parent cd128d2 commit cc8a0f8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/debug.c
Expand Up @@ -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));
Expand Down

0 comments on commit cc8a0f8

Please sign in to comment.