summaryrefslogtreecommitdiff
path: root/src/t_hash.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2019-09-02 12:50:47 +0200
committerantirez <antirez@gmail.com>2019-09-02 12:50:47 +0200
commit06d490342f51cff316588a7a45124cc410b7d050 (patch)
treea205fa6c64b14215dad61877b3999dd29bbe393a /src/t_hash.c
parentb12ccc840e6959027715d8bbc6f6d372ea2fd18f (diff)
downloadredis-06d490342f51cff316588a7a45124cc410b7d050.tar.gz
RESP3: fix cases of NULL reported instead of empty aggregate.
Diffstat (limited to 'src/t_hash.c')
-rw-r--r--src/t_hash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/t_hash.c b/src/t_hash.c
index bc70e4051..e6ed33819 100644
--- a/src/t_hash.c
+++ b/src/t_hash.c
@@ -772,8 +772,8 @@ void genericHgetallCommand(client *c, int flags) {
hashTypeIterator *hi;
int length, count = 0;
- if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.null[c->resp])) == NULL
- || checkType(c,o,OBJ_HASH)) return;
+ if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.emptymap[c->resp]))
+ == NULL || checkType(c,o,OBJ_HASH)) return;
/* We return a map if the user requested keys and values, like in the
* HGETALL case. Otherwise to use a flat array makes more sense. */