X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/64a13a36e685c318319a70b775f91f2c34bcc34f..f1907057221cc1601a914c7626d896483999fb39:/src/t_hash.c diff --git a/src/t_hash.c b/src/t_hash.c index 4b9b37d6..83ca5b27 100644 --- a/src/t_hash.c +++ b/src/t_hash.c @@ -403,8 +403,11 @@ void hdelCommand(redisClient *c) { for (j = 2; j < c->argc; j++) { if (hashTypeDelete(o,c->argv[j])) { - if (hashTypeLength(o) == 0) dbDelete(c->db,c->argv[1]); deleted++; + if (hashTypeLength(o) == 0) { + dbDelete(c->db,c->argv[1]); + break; + } } } if (deleted) {