summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2013-11-15 09:00:24 +0100
committerSebastien Helleu <flashcode@flashtux.org>2013-11-15 09:00:24 +0100
commitd1a89e9db0b0ed0776063648844f808b4f326a43 (patch)
treed2f90c756859d886afcb609aa7c454c85b1e3a81
parent70ed2a8189b8b1cec9b4c14a5f4cdc7137912b2c (diff)
downloadweechat-d1a89e9db0b0ed0776063648844f808b4f326a43.zip
core: fix memory leak when n2 is not a valid number in command /buffer close n1-n2
-rw-r--r--src/core/wee-command.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/wee-command.c b/src/core/wee-command.c
index c58b60219..2af76305f 100644
--- a/src/core/wee-command.c
+++ b/src/core/wee-command.c
@@ -782,7 +782,10 @@ COMMAND_CALLBACK(buffer)
error = NULL;
number2 = strtol (pos_number2, &error, 10);
if (!error || error[0])
+ {
+ free (str_number1);
return WEECHAT_RC_ERROR;
+ }
}
else
number2 = number1;