From: Erwan Velu Date: Mon, 22 Jul 2013 21:46:10 +0000 (+0200) Subject: core: Don't leak memory if error is unknown X-Git-Tag: fio-2.1.2~27 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=0fddbf7a07fa4d6501e7a2fcf2b058325affba57;p=fio.git 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. --- 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++;