init: fix leak bug fix from commit 60c5ec73
[fio.git] / init.c
diff --git a/init.c b/init.c
index 8ed1de6f965f5f3357da6265d40c623ed4749036..569ad858af784ff8920f10ada65ed64458ad1278 100644 (file)
--- a/init.c
+++ b/init.c
@@ -1938,6 +1938,8 @@ int parse_cmd_line(int argc, char *argv[], int client_type)
                        backend = 1;
                        break;
                case 'D':
+                       if (pid_file)
+                               free(pid_file);
                        pid_file = strdup(optarg);
                        break;
                case 'I':