From 4af7c007e120a3fd75cdbbb50d1cf1fd79e67732 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 11 Apr 2014 11:38:38 -0600 Subject: [PATCH] Don't leak memory if profile option is given twice Signed-off-by: Jens Axboe --- init.c | 2 ++ 1 file changed, 2 insertions(+) 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: { -- 2.25.1