From: William Lallemand Date: Fri, 23 Sep 2022 08:21:32 +0000 (+0200) Subject: MINOR: mworker/cli: replace close() by fd_delete() X-Git-Tag: v2.7-dev7~37 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=479cb3ed3a26fa46d1013bbc392435a554e22808;p=thirdparty%2Fhaproxy.git MINOR: mworker/cli: replace close() by fd_delete() Replace the close() call in cli_parse_reload() by a fd_delete() since the FD is one present in the fdtab. --- diff --git a/src/mworker.c b/src/mworker.c index 0f93144302..49113df62b 100644 --- a/src/mworker.c +++ b/src/mworker.c @@ -649,7 +649,7 @@ static int cli_parse_reload(char **args, char *payload, struct appctx *appctx, v /* Send the FD of the current session to the "cli_reload" FD, which won't be polled */ if (fd != -1 && send_fd_uxst(proc_self->ipc_fd[0], fd) == 0) { - close(fd); /* avoid the leak of the FD after sending it via the socketpair */ + fd_delete(fd); /* avoid the leak of the FD after sending it via the socketpair */ } mworker_reload();