mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 14:21:25 +02:00
[MINOR] startup: release unused structs after forking
Don't keep the old pid list or chroot place after startup, they won't be used anymore.
This commit is contained in:
parent
fc815fddd8
commit
d137dd3151
@ -1200,8 +1200,11 @@ int main(int argc, char **argv)
|
|||||||
/* close the pidfile both in children and father */
|
/* close the pidfile both in children and father */
|
||||||
if (pidfile != NULL)
|
if (pidfile != NULL)
|
||||||
fclose(pidfile);
|
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 */
|
/* we might have to unbind some proxies from some processes */
|
||||||
px = proxy;
|
px = proxy;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user