Commit 1fafe7de authored by antirez's avatar antirez
Browse files

CG: fix raxFind() retval check in streamCreateCG().

parent 58f0c000
......@@ -1076,7 +1076,8 @@ void streamConsumerFree(streamConsumer *sc) {
* group is returned. */
streamCG *streamCreateCG(stream *s, char *name, size_t namelen, streamID id) {
if (s->cgroups == NULL) s->cgroups = raxNew();
if (raxFind(s->cgroups,(unsigned char*)name,namelen)) return NULL;
if (raxFind(s->cgroups,(unsigned char*)name,namelen) != raxNotFound)
return NULL;
streamCG *cg = zmalloc(sizeof(*cg));
cg->pel = raxNew();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment