From 5e2aca267883a03dae8193eda9328a48b187fe84 Mon Sep 17 00:00:00 2001 From: Timo Teras Date: Tue, 6 Jan 2009 19:59:50 +0200 Subject: io: fix some memory leaks --- src/archive.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/archive.c') 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, -- cgit v1.2.3-60-g2f50