From d1a89e9db0b0ed0776063648844f808b4f326a43 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Fri, 15 Nov 2013 09:00:24 +0100 Subject: core: fix memory leak when n2 is not a valid number in command /buffer close n1-n2 --- src/core/wee-command.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- cgit v1.2.3