summaryrefslogtreecommitdiffstats
path: root/usr.bin/sendbug/sendbug.c
diff options
context:
space:
mode:
authorsthen <sthen@openbsd.org>2010-04-20 21:33:25 +0000
committersthen <sthen@openbsd.org>2010-04-20 21:33:25 +0000
commitc025b898e22be3878dc4a79533818f6fccea9cca (patch)
treeb83fefc4de64959df46b6bb5807c9d6fb2526799 /usr.bin/sendbug/sendbug.c
parentFix crash that could happen when attempting ``smtpctl remove'' while (diff)
downloadwireguard-openbsd-c025b898e22be3878dc4a79533818f6fccea9cca.tar.xz
wireguard-openbsd-c025b898e22be3878dc4a79533818f6fccea9cca.zip
Fix some pclose() calls, spotted by Peter Philipp. ok deraadt@
Diffstat (limited to 'usr.bin/sendbug/sendbug.c')
-rw-r--r--usr.bin/sendbug/sendbug.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.bin/sendbug/sendbug.c b/usr.bin/sendbug/sendbug.c
index cabe2dd6c8a..f33ef90144a 100644
--- a/usr.bin/sendbug/sendbug.c
+++ b/usr.bin/sendbug/sendbug.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sendbug.c,v 1.65 2010/04/20 19:05:03 sthen Exp $ */
+/* $OpenBSD: sendbug.c,v 1.66 2010/04/20 21:33:25 sthen Exp $ */
/*
* Written by Ray Lai <ray@cyth.net>.
@@ -246,9 +246,8 @@ usbdevs(FILE *ofp)
if (fwrite(buf, 1, len, ofp) != len)
break;
}
- pclose(ofp);
+ pclose(ifp);
}
- pclose(ifp);
}
/*
@@ -621,9 +620,8 @@ hwdump(FILE *ofp)
if (fwrite(buf, 1, len, ofp) != len)
break;
}
- pclose(ofp);
+ pclose(ifp);
}
- pclose(ifp);
free(cmd);
free(acpidir);
}