Module Name: src
Committed By: christos
Date: Sun Dec 13 18:38:23 UTC 2015
Modified Files:
src/sys/arch/hppa/stand/xxboot: iplsum.c
Log Message:
PR/50532: David Binderman: Add missing fclose.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hppa/stand/xxboot/iplsum.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/hppa/stand/xxboot/iplsum.c
diff -u src/sys/arch/hppa/stand/xxboot/iplsum.c:1.1 src/sys/arch/hppa/stand/xxboot/iplsum.c:1.2
--- src/sys/arch/hppa/stand/xxboot/iplsum.c:1.1 Mon Feb 24 02:23:43 2014
+++ src/sys/arch/hppa/stand/xxboot/iplsum.c Sun Dec 13 13:38:23 2015
@@ -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 @@ main(int argc, char *argv[])
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;
}