diff options
author | antirez <antirez@gmail.com> | 2010-03-04 16:48:26 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2010-03-04 16:48:26 +0100 |
commit | ddfaca9d81cdebf4ced1cd65c42983edc052ab57 (patch) | |
tree | fa3951c0290f669c6f918cb067723aa8c4900232 | |
parent | 947efa8d6e37f38bdd8485b64f7c139d1e310e70 (diff) | |
download | redis-ddfaca9d81cdebf4ced1cd65c42983edc052ab57.tar.gz |
A fix for an invalid access when VM is disabled
-rw-r--r-- | redis.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3536,7 +3536,7 @@ static void setGenericCommand(redisClient *c, int nx) { * to overwrite the old. So we delete the old key in the database. * This will also make sure that swap pages about the old object * will be marked as free. */ - if (deleteIfSwapped(c->db,c->argv[1])) + if (server.vm_enabled && deleteIfSwapped(c->db,c->argv[1])) incrRefCount(c->argv[1]); dictReplace(c->db->dict,c->argv[1],c->argv[2]); incrRefCount(c->argv[2]); |