Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
1fafe7de
Commit
1fafe7de
authored
Jan 19, 2018
by
antirez
Browse files
CG: fix raxFind() retval check in streamCreateCG().
parent
58f0c000
Changes
1
Show whitespace changes
Inline
Side-by-side
src/t_stream.c
View file @
1fafe7de
...
...
@@ -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
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment