[Pkg-gnupg-commit] [gnupg2] 81/132: dirmngr: Fix final close of LISTEN_FD.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed May 17 03:07:44 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch experimental
in repository gnupg2.
commit 4b2581dc0ea1d03e70023bb0748aa0c21c0a2173
Author: NIIBE Yutaka <gniibe at fsij.org>
Date: Tue Apr 18 09:04:11 2017 +0900
dirmngr: Fix final close of LISTEN_FD.
* dirmngr/dirmngr.c (handle_connections): Close LISTEN_FD.
Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
---
dirmngr/dirmngr.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dirmngr/dirmngr.c b/dirmngr/dirmngr.c
index 36716c6..8393e0b 100644
--- a/dirmngr/dirmngr.c
+++ b/dirmngr/dirmngr.c
@@ -2046,7 +2046,6 @@ handle_connections (assuan_fd_t listen_fd)
#endif
struct sockaddr_un paddr;
socklen_t plen = sizeof( paddr );
- gnupg_fd_t fd;
int nfd, ret;
fd_set fdset, read_fdset;
struct timespec abstime;
@@ -2190,6 +2189,8 @@ handle_connections (assuan_fd_t listen_fd)
if (FD_ISSET (FD2INT (listen_fd), &read_fdset))
{
+ gnupg_fd_t fd;
+
plen = sizeof paddr;
fd = INT2FD (npth_accept (FD2INT(listen_fd),
(struct sockaddr *)&paddr, &plen));
@@ -2218,7 +2219,6 @@ handle_connections (assuan_fd_t listen_fd)
}
npth_setname_np (thread, threadname);
}
- fd = GNUPG_INVALID_FD;
}
}
@@ -2228,7 +2228,7 @@ handle_connections (assuan_fd_t listen_fd)
#endif /*HAVE_INOTIFY_INIT*/
npth_attr_destroy (&tattr);
if (listen_fd != GNUPG_INVALID_FD)
- assuan_sock_close (fd);
+ assuan_sock_close (listen_fd);
cleanup ();
log_info ("%s %s stopped\n", strusage(11), strusage(13));
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list