]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mworker/cli: replace close() by fd_delete()
authorWilliam Lallemand <wlallemand@haproxy.org>
Fri, 23 Sep 2022 08:21:32 +0000 (10:21 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Fri, 23 Sep 2022 08:28:56 +0000 (10:28 +0200)
Replace the close() call in cli_parse_reload() by a fd_delete() since
the FD is one present in the fdtab.

src/mworker.c

index 0f9314430209dee8e35c2229e1129623091e8daf..49113df62bdd40d5e0a66fe28b3473827d0d7e99 100644 (file)
@@ -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();