mirror of https://mirror.osredm.com/root/redis.git
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…
Reference in New Issue