diff --git a/lib/libc/net/hesiod.c b/lib/libc/net/hesiod.c index c22bdbad836b..24137279d8f3 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; }