core/service: service_add_fd_store() consumes passed fd
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 21 Nov 2024 20:15:49 +0000 (05:15 +0900)
committerMike Yuan <me@yhndnzj.com>
Fri, 22 Nov 2024 03:15:51 +0000 (04:15 +0100)
commitd99198819caeff6f40a0a520364e59b8a0cbaa4f
treeb7b62fb7e455ea32dc989ba41d6a335eccb5c2b4
parentf70e5620b6ac319beac1d5ce26331bdc48d25daa
core/service: service_add_fd_store() consumes passed fd

Without this change, the fd is closed twice on failure.

Fixes a bug introduced by dff9808a628c31b7ecb1f1aba8fdc3be06ce8372.

Fixes #35288.
src/core/service.c