From 7e4ae80d87d886c7d23d9989aa7b5882b9315d50 Mon Sep 17 00:00:00 2001 From: graham.gower Date: Sun, 22 Nov 2009 19:28:25 -0500 Subject: 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 --- (limited to 'libbb') 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); -- cgit v0.9.1