diff options
author | 2011-04-24 22:44:22 +0000 | |
---|---|---|
committer | 2011-04-24 22:44:22 +0000 | |
commit | cff2887021e1712cb74456870e8d0d398ed5492a (patch) | |
tree | 65e6b7785e0455683e4c7d9856b6211117bdb906 | |
parent | Grr, this was supposed to be an import without the testsuite directories, (diff) | |
download | wireguard-openbsd-cff2887021e1712cb74456870e8d0d398ed5492a.tar.xz wireguard-openbsd-cff2887021e1712cb74456870e8d0d398ed5492a.zip |
Don't leak fd's in sr_installboot(). From cppcheck via Amit Kulkarni.
-rw-r--r-- | sys/arch/amd64/stand/installboot/installboot.c | 4 | ||||
-rw-r--r-- | sys/arch/i386/stand/installboot/installboot.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/arch/amd64/stand/installboot/installboot.c b/sys/arch/amd64/stand/installboot/installboot.c index 1f89c270823..f4ffd365c76 100644 --- a/sys/arch/amd64/stand/installboot/installboot.c +++ b/sys/arch/amd64/stand/installboot/installboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: installboot.c,v 1.18 2011/03/19 11:55:58 krw Exp $ */ +/* $OpenBSD: installboot.c,v 1.19 2011/04/24 22:44:22 krw Exp $ */ /* $NetBSD: installboot.c,v 1.5 1995/11/17 23:23:50 gwr Exp $ */ /* @@ -737,6 +737,8 @@ sr_installboot(int devfd) if (verbose) fprintf(stderr, "%s is %d blocks x %d bytes\n", boot, nblocks, bsize); + + close(fd); } void diff --git a/sys/arch/i386/stand/installboot/installboot.c b/sys/arch/i386/stand/installboot/installboot.c index 85fdb19948b..5ac896d5680 100644 --- a/sys/arch/i386/stand/installboot/installboot.c +++ b/sys/arch/i386/stand/installboot/installboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: installboot.c,v 1.61 2011/03/19 11:55:58 krw Exp $ */ +/* $OpenBSD: installboot.c,v 1.62 2011/04/24 22:44:22 krw Exp $ */ /* $NetBSD: installboot.c,v 1.5 1995/11/17 23:23:50 gwr Exp $ */ /* @@ -733,6 +733,8 @@ sr_installboot(int devfd) if (verbose) fprintf(stderr, "%s is %d blocks x %d bytes\n", boot, nblocks, bsize); + + close(fd); } void |