summary refs log tree commit diff stats
path: root/src/common/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/util.c')
-rw-r--r--src/common/util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/util.c b/src/common/util.c
index 32082fe1..dec9d4df 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -1404,7 +1404,10 @@ util_exec (const char *cmd)
 #ifndef WIN32
 	pid = fork ();
 	if (pid == -1)
+	{
+		free (argv);
 		return -1;
+	}
 	if (pid == 0)
 	{
 		/* Now close all open file descriptors except stdin, stdout and stderr */