From 1749fe7a26e6ce53ab90271aa807380bd9458d3a Mon Sep 17 00:00:00 2001 From: michael-grunder Date: Sat, 2 Jun 2018 18:22:20 -0700 Subject: [PATCH] Return early in XPENDING if sent a nonexistent consumer group. --- src/t_stream.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/t_stream.c b/src/t_stream.c index 6cbef56c..ebcf1a55 100644 --- a/src/t_stream.c +++ b/src/t_stream.c @@ -1728,8 +1728,10 @@ void xpendingCommand(client *c) { /* If a consumer name was mentioned but it does not exist, we can * just return an empty array. */ - if (consumername && consumer == NULL) + if (consumername && consumer == NULL) { addReplyMultiBulkLen(c,0); + return; + } rax *pel = consumer ? consumer->pel : group->pel; unsigned char startkey[sizeof(streamID)];