summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2018-03-06 13:03:48 +0100
committerantirez <antirez@gmail.com>2018-03-15 12:54:10 +0100
commit67eeeb0b1084a72f2eca296235f732bb8d1d472c (patch)
treea4d27598b41ba8a304a21647d90ab1c9e914ead6
parent8d8755c7b56069646ab0bd02e46652bfee19fcd1 (diff)
downloadredis-67eeeb0b1084a72f2eca296235f732bb8d1d472c.tar.gz
Streams: fix XREAD missing check for NULL object.
-rw-r--r--src/t_stream.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/t_stream.c b/src/t_stream.c
index e2908d2cf..3b7d022a1 100644
--- a/src/t_stream.c
+++ b/src/t_stream.c
@@ -1171,7 +1171,7 @@ void xreadCommand(client *c) {
if (strcmp(c->argv[i]->ptr,"$") == 0) {
o = lookupKeyRead(c->db,key);
- if (checkType(c,o,OBJ_STREAM)) goto cleanup;
+ if (o && checkType(c,o,OBJ_STREAM)) goto cleanup;
if (o) {
stream *s = o->ptr;
ids[id_idx] = s->last_id;