mirror of
https://github.com/fluencelabs/redis
synced 2025-03-20 01:20:50 +00:00
CG: fix raxFind() retval check in streamCreateCG().
This commit is contained in:
parent
58f0c000a5
commit
1fafe7def1
@ -1076,7 +1076,8 @@ void streamConsumerFree(streamConsumer *sc) {
|
|||||||
* group is returned. */
|
* group is returned. */
|
||||||
streamCG *streamCreateCG(stream *s, char *name, size_t namelen, streamID id) {
|
streamCG *streamCreateCG(stream *s, char *name, size_t namelen, streamID id) {
|
||||||
if (s->cgroups == NULL) s->cgroups = raxNew();
|
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));
|
streamCG *cg = zmalloc(sizeof(*cg));
|
||||||
cg->pel = raxNew();
|
cg->pel = raxNew();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user