summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsdinstall/distextract
diff options
context:
space:
mode:
authorkevlo <kevlo@FreeBSD.org>2011-11-28 05:34:16 +0000
committerkevlo <kevlo@FreeBSD.org>2011-11-28 05:34:16 +0000
commit6473db59df76b9aa589e199e2847c57a18da2ab2 (patch)
treec7afc4b69d9e9ba70b33ded78f534b09f5a465c9 /usr.sbin/bsdinstall/distextract
parenteb7c1e5049be3381264012c77f7f4d2c998dd48f (diff)
downloadFreeBSD-src-6473db59df76b9aa589e199e2847c57a18da2ab2.zip
FreeBSD-src-6473db59df76b9aa589e199e2847c57a18da2ab2.tar.gz
Plug memory leaks and fix open(2) error check.
Reviewed by: nwhitehorn MFC after: 3 days
Diffstat (limited to 'usr.sbin/bsdinstall/distextract')
-rw-r--r--usr.sbin/bsdinstall/distextract/distextract.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.sbin/bsdinstall/distextract/distextract.c b/usr.sbin/bsdinstall/distextract/distextract.c
index 397932f..a76ebfe 100644
--- a/usr.sbin/bsdinstall/distextract/distextract.c
+++ b/usr.sbin/bsdinstall/distextract/distextract.c
@@ -49,6 +49,7 @@ main(void)
dists = calloc(ndists, sizeof(const char *));
if (dists == NULL) {
fprintf(stderr, "Out of memory!\n");
+ free(diststring);
return (1);
}
OpenPOWER on IntegriCloud