fp leak in hesiod.c . Fix: diff -u -r1.9 hesiod.c --- lib/libc/net/hesiod.c 1 May 2003 19:03:14 -0000 1.9 +++ lib/libc/net/hesiod.c 5 Jan 2011 11:03:35 -0000 @@ -325,6 +325,7 @@ *which = strdup(data); if (!*which) { errno = ENOMEM; + fclose(fp); return -1; } } else { Patch attached with submission follows:
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; } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Author: kib Date: Sat Jan 15 08:35:41 2011 New Revision: 217440 URL: http://svn.freebsd.org/changeset/base/217440 Log: MFC r217143: Fix struct FILE * leak on error (in disabled by default hesiod support code). PR: 153756 Modified: stable/8/lib/libc/net/hesiod.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/locale/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/lib/libc/sys/ (props changed) Modified: stable/8/lib/libc/net/hesiod.c ============================================================================== --- stable/8/lib/libc/net/hesiod.c Sat Jan 15 08:18:58 2011 (r217439) +++ stable/8/lib/libc/net/hesiod.c Sat Jan 15 08:35:41 2011 (r217440) @@ -324,6 +324,7 @@ read_config_file(ctx, filename) ? &ctx->lhs : &ctx->rhs; *which = strdup(data); if (!*which) { + fclose(fp); errno = ENOMEM; return -1; } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
State Changed From-To: open->patched In head and 8.x but not in 7.x
State Changed From-To: patched->closed Indeed, fixed in HEAD and 8.