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
1bb5ee9c
"vscode:/vscode.git/clone" did not exist on "70e39481ab1a7e43fefec67c31b4fe496cd10723"
Commit
1bb5ee9c
authored
Jan 16, 2020
by
hwware
Committed by
antirez
Feb 27, 2020
Browse files
fix potentical memory leaks
parent
97329733
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/debug.c
View file @
1bb5ee9c
...
@@ -685,9 +685,12 @@ NULL
...
@@ -685,9 +685,12 @@ NULL
sds
stats
=
sdsempty
();
sds
stats
=
sdsempty
();
char
buf
[
4096
];
char
buf
[
4096
];
if
(
getLongFromObjectOrReply
(
c
,
c
->
argv
[
2
],
&
dbid
,
NULL
)
!=
C_OK
)
if
(
getLongFromObjectOrReply
(
c
,
c
->
argv
[
2
],
&
dbid
,
NULL
)
!=
C_OK
){
sdsfree
(
stats
);
return
;
return
;
}
if
(
dbid
<
0
||
dbid
>=
server
.
dbnum
)
{
if
(
dbid
<
0
||
dbid
>=
server
.
dbnum
)
{
sdsfree
(
stats
);
addReplyError
(
c
,
"Out of range database"
);
addReplyError
(
c
,
"Out of range database"
);
return
;
return
;
}
}
...
...
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