summaryrefslogtreecommitdiff
path: root/usr.bin/sendbug/sendbug.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2010-03-23 19:19:54 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2010-03-23 19:19:54 +0000
commita102e67b703d996c3298158402c016bfa9ec35f8 (patch)
tree656f948f38b58c3b7739f96ef81d26e0fe221d61 /usr.bin/sendbug/sendbug.c
parent79e517623a1bd39fb1e441ce77ac289a9fb5d414 (diff)
fixes memory and FILE handle leaks. `acpidir' is allocated via
asprintf(3) and `ifp' is opened via popen(3), but not closed. from zinovik
Diffstat (limited to 'usr.bin/sendbug/sendbug.c')
-rw-r--r--usr.bin/sendbug/sendbug.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/sendbug/sendbug.c b/usr.bin/sendbug/sendbug.c
index aaba5133c5c..780190615c4 100644
--- a/usr.bin/sendbug/sendbug.c
+++ b/usr.bin/sendbug/sendbug.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sendbug.c,v 1.63 2009/08/26 20:40:40 deraadt Exp $ */
+/* $OpenBSD: sendbug.c,v 1.64 2010/03/23 19:19:53 deraadt Exp $ */
/*
* Written by Ray Lai <ray@cyth.net>.
@@ -600,7 +600,9 @@ hwdump(FILE *ofp)
}
pclose(ofp);
}
+ pclose(ifp);
free(cmd);
+ free(acpidir);
}
void