Unverified Commit f7e05dc7 authored by Salvatore Sanfilippo's avatar Salvatore Sanfilippo Committed by GitHub
Browse files

Merge pull request #6783 from hwware/memoryleakfix

Fix Memory Leaks in debug.c
parents 4f297537 67ee8752
...@@ -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;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment