]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: namespace: fix fd leak in master-worker mode
authorKrisztián Kovács (kkovacs) <Krisztian.Kovacs@oneidentity.com>
Fri, 20 Sep 2019 14:48:19 +0000 (14:48 +0000)
committerWilly Tarreau <w@1wt.eu>
Mon, 23 Sep 2019 17:08:39 +0000 (19:08 +0200)
commit538aa7168fca1adf2ecd0aa4a47e6b8856275f55
treefd08b48ca960eb44c8c269fdf33fbabff29d253f
parent7ceb96be720352d673f4654fb51210801314b049
BUG/MEDIUM: namespace: fix fd leak in master-worker mode

When namespaces are used in the configuration, the respective namespace handles
are opened during config parsing and stored in an ebtree for lookup later.

Unfortunately, when the master process re-execs itself these file descriptors
were not closed, effectively leaking the fds and preventing destruction of
namespaces no longer present in the configuration.

This change fixes this issue by opening the namespace file handles as
close-on-exec, making sure that they will be closed during re-exec.
src/namespace.c