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:40 +0200
commite9d0d86dbfbbe4d8e10c761b734ac12a9b9c1a8c (patch)
tree508efb4a06d1c879a897d7a7665f70db7b81aeb6
parent96b5dc0b98cf849e4bba3c9d11f1d978a37dae92 (diff)
downloadredis-e9d0d86dbfbbe4d8e10c761b734ac12a9b9c1a8c.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 48ac05c1e..654ca43c5 100644
--- a/src/db.c
+++ b/src/db.c
@@ -274,6 +274,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,