From: graham.gower Date: Mon, 23 Nov 2009 00:28:25 +0000 (+0000) Subject: Don't leak the ar_header or the tar_header. X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7e4ae80d87d886c7d23d9989aa7b5882b9315d50;p=oweals%2Fopkg-lede.git Don't leak the ar_header or the tar_header. git-svn-id: http://opkg.googlecode.com/svn/trunk@347 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- diff --git a/libbb/unarchive.c b/libbb/unarchive.c index 5e9c13a..07c24f2 100644 --- a/libbb/unarchive.c +++ b/libbb/unarchive.c @@ -662,6 +662,8 @@ char *deb_extract(const char *package_filename, FILE *out_stream, output_buffer = unarchive(uncompressed_stream, out_stream, get_header_tar, free_header_tar, extract_function, prefix, file_list); fclose(uncompressed_stream); gz_close(gunzip_pid); + free (ar_header->name); + free (ar_header); break; } seek_sub_file(deb_stream, ar_header->size); @@ -708,6 +710,7 @@ char *deb_extract(const char *package_filename, FILE *out_stream, free_header_tar(tar_header); fclose(uncompressed_stream); gz_close(gunzip_pid); + free_header_tar(tar_header); break; } seek_sub_file(unzipped_opkg_stream, tar_header->size);