The latter close is from a sweep of the tree looking for fdopen problems.
While reviewing the patch, gerhard@ fixed another leak.
ok gerhard@
-/* $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 $ */
/*
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