]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/service.c
pid1: fix fd memleak when we hit FileDescriptorStoreMax limit 4456/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 2 Nov 2016 19:00:54 +0000 (15:00 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 2 Nov 2016 19:07:17 +0000 (15:07 -0400)
commitb09246352f751c95ab06f598b639f6f6ca0e67b1
tree1c1106807ac69739ecf2fbd2301709217fced0f0
parentbff653e3970bb79832568ae86b095ee530b62302
pid1: fix fd memleak when we hit FileDescriptorStoreMax limit

Since service_add_fd_store() already does the check, remove the redundant check
from service_add_fd_store_set().

Also, print a warning when repopulating FDStore after daemon-reexec and we hit
the limit. This is a user visible issue, so we should not discard fds silently.
(Note that service_deserialize_item is impacted by the return value from
service_add_fd_store(), but we rely on the general error message, so the caller
does not need to be modified, and does not show up in the diff.)
src/core/service.c