Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/sup/source Close file on error path. PR 50925 from ...



details:   https://anonhg.NetBSD.org/src/rev/6838bbc3eb5f
branches:  trunk
changeset: 344073:6838bbc3eb5f
user:      dholland <dholland%NetBSD.org@localhost>
date:      Sat Mar 12 02:27:31 2016 +0000

description:
Close file on error path. PR 50925 from David Binderman.

diffstat:

 usr.sbin/sup/source/cvt.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r ecf3a53072c5 -r 6838bbc3eb5f usr.sbin/sup/source/cvt.c
--- a/usr.sbin/sup/source/cvt.c Sat Mar 12 02:26:40 2016 +0000
+++ b/usr.sbin/sup/source/cvt.c Sat Mar 12 02:27:31 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cvt.c,v 1.3 2002/07/10 18:53:57 wiz Exp $      */
+/*     $NetBSD: cvt.c,v 1.4 2016/03/12 02:27:31 dholland Exp $ */
 
 /*
  * Quick hack to convert old binary sup when.collection files into 
@@ -45,6 +45,7 @@
 
        if (fprintf(fp, "%ld\n", b) < 0) {
                perror("fprintf");
+               fclose(fp);
                return 1;
        }
        if (fclose(fp) != 0) {



Home | Main Index | Thread Index | Old Index