commit | 9fc6c97fb30bb9c15d6b6e34c917b0b5aba7486a | [log] [tgz] |
---|---|---|
author | William Lallemand <wlallemand@haproxy.com> | Mon Jun 08 10:01:13 2020 +0200 |
committer | William Lallemand <wlallemand@haproxy.org> | Mon Jun 08 10:01:13 2020 +0200 |
tree | 456ff388ecbee646c35986a35fb7a477474f85b9 | |
parent | e5ff4addb2300db60f5a4d1f99abd54b4a1a94f6 [diff] |
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.
diff --git a/src/haproxy.c b/src/haproxy.c index 92a54ba..5d7b0fe 100644 --- a/src/haproxy.c +++ b/src/haproxy.c
@@ -844,6 +844,8 @@ 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: