1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-11-11 21:48:50 +01:00

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>
This commit is contained in:
Daniel Kahn Gillmor 2016-10-05 00:23:11 -04:00 committed by Werner Koch
parent 1a9c8d78ec
commit a2127c71db
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -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;
}