BUG/MINOR: mworker: fix a memleak when execvp() failed

Free next_argv when execvp() failed.

Must be backported as far as 1.8.

Should fix issue #668.
This commit is contained in:
William Lallemand 2020-06-08 10:01:13 +02:00 committed by William Lallemand
parent e5ff4addb2
commit 9fc6c97fb3

View File

@ -844,6 +844,8 @@ void mworker_reload()
execvp(next_argv[0], next_argv);
ha_warning("Failed to reexecute the master process [%d]: %s\n", pid, strerror(errno));
free(next_argv);
next_argv = NULL;
return;
alloc_error: