Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Jan 2011 10:56:58 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r217143 - head/lib/libc/net
Message-ID:  <201101081056.p08Auwqu088926@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sat Jan  8 10:56:58 2011
New Revision: 217143
URL: http://svn.freebsd.org/changeset/base/217143

Log:
  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

Modified:
  head/lib/libc/net/hesiod.c

Modified: head/lib/libc/net/hesiod.c
==============================================================================
--- head/lib/libc/net/hesiod.c	Sat Jan  8 08:58:46 2011	(r217142)
+++ head/lib/libc/net/hesiod.c	Sat Jan  8 10:56:58 2011	(r217143)
@@ -324,6 +324,7 @@ read_config_file(ctx, filename)
 			    ? &ctx->lhs : &ctx->rhs;
 			*which = strdup(data);
 			if (!*which) {
+				fclose(fp);
 				errno = ENOMEM;
 				return -1;
 			}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101081056.p08Auwqu088926>