mirror of
https://github.com/fluencelabs/redis
synced 2025-05-28 09:41:19 +00:00
Merge pull request #6783 from hwware/memoryleakfix
Fix Memory Leaks in debug.c
This commit is contained in:
commit
f7e05dc755
@ -685,9 +685,12 @@ NULL
|
||||
sds stats = sdsempty();
|
||||
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;
|
||||
}
|
||||
if (dbid < 0 || dbid >= server.dbnum) {
|
||||
sdsfree(stats);
|
||||
addReplyError(c,"Out of range database");
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user