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
hiredis
Commits
2d9d7751
Unverified
Commit
2d9d7751
authored
Aug 18, 2021
by
rouzier
Committed by
GitHub
Aug 18, 2021
Browse files
Don't leak memory if an invalid type is set (#906)
Co-authored-by:
James Rouzier
<
jrouzier@inverse.ca
>
parent
f5f31ff9
Changes
1
Show whitespace changes
Inline
Side-by-side
hiredis.c
View file @
2d9d7751
...
@@ -835,7 +835,7 @@ redisContext *redisConnectWithOptions(const redisOptions *options) {
...
@@ -835,7 +835,7 @@ redisContext *redisConnectWithOptions(const redisOptions *options) {
c
->
fd
=
options
->
endpoint
.
fd
;
c
->
fd
=
options
->
endpoint
.
fd
;
c
->
flags
|=
REDIS_CONNECTED
;
c
->
flags
|=
REDIS_CONNECTED
;
}
else
{
}
else
{
// Unknown type - FIXME - FREE
redisFree
(
c
);
return
NULL
;
return
NULL
;
}
}
...
...
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