summaryrefslogtreecommitdiffstats
path: root/agent/gpg-agent.c
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2016-10-05 06:23:11 +0200
committerWerner Koch <wk@gnupg.org>2016-10-05 08:11:53 +0200
commita2127c71dbf87c1710b43d91a733dd4c9b2953bc (patch)
tree057253a8edc9fb63714fe939863311eccbcf5a53 /agent/gpg-agent.c
parentagent: Streamline the supervised mode code. (diff)
downloadgnupg2-a2127c71dbf87c1710b43d91a733dd4c9b2953bc.tar.xz
gnupg2-a2127c71dbf87c1710b43d91a733dd4c9b2953bc.zip
agent: Fix error handling in map_supervised_sockets
* agent/gpg-agent.c (map_supervised_sockets): the file descriptor to close on error is fd, not i. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Diffstat (limited to 'agent/gpg-agent.c')
-rw-r--r--agent/gpg-agent.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
index 1696e5a1c..9c7b8fcc9 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
@@ -758,14 +758,14 @@ map_supervised_sockets (gnupg_fd_t *r_fd,
{
log_error ("cannot listen on fd %d for %s socket\n",
fd, tbl[j].label);
- close (i);
+ close (fd);
}
}
else
{
log_error ("cannot listen on more than one %s socket\n",
tbl[j].label);
- close (i);
+ close (fd);
}
break;
}