From: Jens Axboe Date: Fri, 11 Apr 2014 17:38:38 +0000 (-0600) Subject: Don't leak memory if profile option is given twice X-Git-Tag: fio-2.1.9~68 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=4af7c007e120a3fd75cdbbb50d1cf1fd79e67732 Don't leak memory if profile option is given twice Signed-off-by: Jens Axboe --- diff --git a/init.c b/init.c index 1c37ab92..a0ec9141 100644 --- a/init.c +++ b/init.c @@ -1828,6 +1828,8 @@ int parse_cmd_line(int argc, char *argv[], int client_type) break; } case 'p': + if (exec_profile) + free(exec_profile); exec_profile = strdup(optarg); break; case FIO_GETOPT_JOB: {