diff --git a/src/haproxy.c b/src/haproxy.c index 85c2e3a01..75a310d10 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -1200,8 +1200,11 @@ int main(int argc, char **argv) /* close the pidfile both in children and father */ if (pidfile != NULL) fclose(pidfile); - free(global.pidfile); - global.pidfile = NULL; + + /* We won't ever use this anymore */ + free(oldpids); oldpids = NULL; + free(global.chroot); global.chroot = NULL; + free(global.pidfile); global.pidfile = NULL; /* we might have to unbind some proxies from some processes */ px = proxy;