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/3045177e233f
branches:  trunk
changeset: 342246:3045177e233f
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 97371f2aa9f0 -r 3045177e233f 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