summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2011-01-08 10:56:58 +0000
committerkib <kib@FreeBSD.org>2011-01-08 10:56:58 +0000
commite98ca052817b88269f455435549761ccd0ee2e8a (patch)
tree62d1847be6b71a1f87b64d6beaf088f6ac3a7cd4
parent3cb53d70b9e8f98c526f015964d2037890c229e1 (diff)
downloadFreeBSD-src-e98ca052817b88269f455435549761ccd0ee2e8a.zip
FreeBSD-src-e98ca052817b88269f455435549761ccd0ee2e8a.tar.gz
Fix struct FILE * leak on error (in disabled by default hesiod support code).
Submitted by: henning petersen <henning.petersen t-online de> PR: 153756 MFC after: 1 week
-rw-r--r--lib/libc/net/hesiod.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libc/net/hesiod.c b/lib/libc/net/hesiod.c
index c22bdba..2413727 100644
--- a/lib/libc/net/hesiod.c
+++ b/lib/libc/net/hesiod.c
@@ -324,6 +324,7 @@ read_config_file(ctx, filename)
? &ctx->lhs : &ctx->rhs;
*which = strdup(data);
if (!*which) {
+ fclose(fp);
errno = ENOMEM;
return -1;
}
OpenPOWER on IntegriCloud