summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Stancliff <matt@genges.com>2014-04-10 17:08:02 -0400
committerantirez <antirez@gmail.com>2014-04-23 16:14:34 +0200
commite687621e1552b6fdc723ca52d986cf145ca4879d (patch)
treeee52c3bbf1ff31264742314a0e271e35e9f4db31
parent0c8fdb349ce409d35b2511a884330b303ed0b435 (diff)
downloadredis-e687621e1552b6fdc723ca52d986cf145ca4879d.tar.gz
Check key expiration before deleting
Deleting an expired key should return 0, not success. Fixes #1648
-rw-r--r--src/db.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/db.c b/src/db.c
index 6ebfe6363..72fc2be0a 100644
--- a/src/db.c
+++ b/src/db.c
@@ -280,6 +280,7 @@ void delCommand(redisClient *c) {
int deleted = 0, j;
for (j = 1; j < c->argc; j++) {
+ expireIfNeeded(c->db,c->argv[j]);
if (dbDelete(c->db,c->argv[j])) {
signalModifiedKey(c->db,c->argv[j]);
notifyKeyspaceEvent(REDIS_NOTIFY_GENERIC,