From 0fddbf7a07fa4d6501e7a2fcf2b058325affba57 Mon Sep 17 00:00:00 2001 From: Erwan Velu Date: Mon, 22 Jul 2013 23:46:10 +0200 Subject: [PATCH] core: Don't leak memory if error is unknown If error is unknown, the "return 1" call was not freeing error which was malloced at the beginning of the function. --- options.c | 1 + 1 file changed, 1 insertion(+) diff --git a/options.c b/options.c index 6462c67c..1c44f426 100644 --- a/options.c +++ b/options.c @@ -271,6 +271,7 @@ static int ignore_error_type(struct thread_data *td, int etype, char *str) if (!error[i]) { log_err("Unknown error %s, please use number value \n", fname); + free(error); return 1; } i++; -- 2.25.1