summaryrefslogtreecommitdiff
path: root/src/gunzip.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-10-07 17:03:51 +0300
committerTimo Teräs <timo.teras@iki.fi>2014-10-07 17:04:38 +0300
commit1bbca16333bb655b73bd80fc40d072fc697e4650 (patch)
tree01d62ed4910e81ea195e980c6cdf7d1cc69fab62 /src/gunzip.c
parent09e48d8f06bfb924b80ce3e95c281524c4891828 (diff)
downloadapk-tools-1bbca16333bb655b73bd80fc40d072fc697e4650.tar.gz
apk-tools-1bbca16333bb655b73bd80fc40d072fc697e4650.tar.bz2
apk-tools-1bbca16333bb655b73bd80fc40d072fc697e4650.tar.xz
apk-tools-1bbca16333bb655b73bd80fc40d072fc697e4650.zip
io: fix few error path leaks
Diffstat (limited to 'src/gunzip.c')
-rw-r--r--src/gunzip.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gunzip.c b/src/gunzip.c
index bed81df..944132e 100644
--- a/src/gunzip.c
+++ b/src/gunzip.c
@@ -149,12 +149,10 @@ struct apk_istream *apk_bstream_gunzip_mpart(struct apk_bstream *bs,
{
struct apk_gzip_istream *gis;
- if (bs == NULL)
- return NULL;
+ if (!bs) return NULL;
gis = malloc(sizeof(struct apk_gzip_istream));
- if (gis == NULL)
- goto err;
+ if (!gis) goto err;
*gis = (struct apk_gzip_istream) {
.is.read = gzi_read,