Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hppa/stand/xxboot PR/50532: David Binderman: Add mi...



details:   https://anonhg.NetBSD.org/src/rev/87f22f1f0067
branches:  trunk
changeset: 812388:87f22f1f0067
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Dec 13 18:38:23 2015 +0000

description:
PR/50532: David Binderman: Add missing fclose.

diffstat:

 sys/arch/hppa/stand/xxboot/iplsum.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r 8f5462291d2f -r 87f22f1f0067 sys/arch/hppa/stand/xxboot/iplsum.c
--- a/sys/arch/hppa/stand/xxboot/iplsum.c       Sun Dec 13 18:35:26 2015 +0000
+++ b/sys/arch/hppa/stand/xxboot/iplsum.c       Sun Dec 13 18:38:23 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iplsum.c,v 1.1 2014/02/24 07:23:43 skrll Exp $ */
+/*     $NetBSD: iplsum.c,v 1.2 2015/12/13 18:38:23 christos Exp $      */
 
 /*
  * Calculate 32bit checksum of IPL and store in a certain location
@@ -54,9 +54,11 @@
                return 1;
        }
        if ((len = fread(bootblk, 1, sizeof bootblk, fp)) <= IPLOFF) {
+               fclose(fp);
                fprintf(stderr, "%s: too short\n", argv[1]);
                return 1;
        } else if (len > BOOTSIZE) {
+               fclose(fp);
                fprintf(stderr, "%s: too long (%d vs %d)\n", argv[1], len, BOOTSIZE);
                return 1;
        }



Home | Main Index | Thread Index | Old Index