projects
/
haproxy-2.1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
436f0e5
)
BUG/MINOR: mworker: fix a memleak when execvp() failed
author
William Lallemand
<wlallemand@haproxy.com>
Mon, 8 Jun 2020 08:01:13 +0000
(10:01 +0200)
committer
William Lallemand
<wlallemand@haproxy.org>
Mon, 8 Jun 2020 08:19:33 +0000
(10:19 +0200)
Free next_argv when execvp() failed.
Must be backported as far as 1.8.
Should fix issue #668.
(cherry picked from commit
9fc6c97fb30bb9c15d6b6e34c917b0b5aba7486a
)
Signed-off-by: William Lallemand <wlallemand@haproxy.org>
src/haproxy.c
patch
|
blob
|
history
diff --git
a/src/haproxy.c
b/src/haproxy.c
index
d97c1f3
..
42f898f
100644
(file)
--- a/
src/haproxy.c
+++ b/
src/haproxy.c
@@
-853,6
+853,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: