diff options
author | 2010-03-23 19:19:53 +0000 | |
---|---|---|
committer | 2010-03-23 19:19:53 +0000 | |
commit | aadec98952a909fbd13f981fa10a50075054fcd6 (patch) | |
tree | b0acb4437efea6747e4d00282d419b40e18b27e3 /usr.bin/sendbug/sendbug.c | |
parent | tweak previous; ok otto (diff) | |
download | wireguard-openbsd-aadec98952a909fbd13f981fa10a50075054fcd6.tar.xz wireguard-openbsd-aadec98952a909fbd13f981fa10a50075054fcd6.zip |
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.c | 4 |
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 |