summaryrefslogtreecommitdiff
path: root/sbin/isakmpd
diff options
context:
space:
mode:
authorDoug Hogan <doug@cvs.openbsd.org>2014-08-25 08:00:49 +0000
committerDoug Hogan <doug@cvs.openbsd.org>2014-08-25 08:00:49 +0000
commit02813df82158ec37cbaffde8c38c10221f1139ac (patch)
tree817e55136273ffbfe569240ed69d8697988e6419 /sbin/isakmpd
parent3ce4bc0c280ae5c7531019bcad5a537825322a3c (diff)
Fix a few fd leaks in isakmpd.
The latter close is from a sweep of the tree looking for fdopen problems. While reviewing the patch, gerhard@ fixed another leak. ok gerhard@
Diffstat (limited to 'sbin/isakmpd')
-rw-r--r--sbin/isakmpd/ike_auth.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/isakmpd/ike_auth.c b/sbin/isakmpd/ike_auth.c
index b009baf78ac..bd122a6ceb2 100644
--- a/sbin/isakmpd/ike_auth.c
+++ b/sbin/isakmpd/ike_auth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ike_auth.c,v 1.111 2014/08/23 00:48:57 doug Exp $ */
+/* $OpenBSD: ike_auth.c,v 1.112 2014/08/25 08:00:48 doug Exp $ */
/* $EOM: ike_auth.c,v 1.59 2000/11/21 00:21:31 angelos Exp $ */
/*
@@ -301,12 +301,14 @@ ignorekeynote:
if (check_file_secrecy_fd(fd, keyfile, &fsize)) {
free(privkeyfile);
+ close(fd);
return 0;
}
if ((keyfp = fdopen(fd, "r")) == NULL) {
log_print("ike_auth_get_key: fdopen failed");
free(privkeyfile);
+ close(fd);
return 0;
}
#if SSLEAY_VERSION_NUMBER >= 0x00904100L