summaryrefslogtreecommitdiff
path: root/src/archive.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-01-06 19:59:50 +0200
committerTimo Teras <timo.teras@iki.fi>2009-01-06 21:23:26 +0200
commit5e2aca267883a03dae8193eda9328a48b187fe84 (patch)
treef3c20ca4f242c3acd672adbe20d010e3a2763853 /src/archive.c
parent6b2b9d303e61599d566a70b6e3100b9afe400d4b (diff)
downloadapk-tools-5e2aca267883a03dae8193eda9328a48b187fe84.tar.gz
apk-tools-5e2aca267883a03dae8193eda9328a48b187fe84.tar.bz2
apk-tools-5e2aca267883a03dae8193eda9328a48b187fe84.tar.xz
apk-tools-5e2aca267883a03dae8193eda9328a48b187fe84.zip
io: fix some memory leaks
Diffstat (limited to 'src/archive.c')
-rw-r--r--src/archive.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/archive.c b/src/archive.c
index 0cb575b..7e78659 100644
--- a/src/archive.c
+++ b/src/archive.c
@@ -179,7 +179,14 @@ int apk_parse_tar(struct apk_istream *is, apk_archive_entry_parser parser,
int apk_parse_tar_gz(struct apk_bstream *bs, apk_archive_entry_parser parser,
void *ctx)
{
- return apk_parse_tar(apk_bstream_gunzip(bs), parser, ctx);
+ struct apk_istream *is;
+ int rc;
+
+ is = apk_bstream_gunzip(bs, FALSE);
+ rc = apk_parse_tar(is, parser, ctx);
+ is->close(is);
+
+ return rc;
}
int apk_archive_entry_extract(const struct apk_file_info *ae,