summaryrefslogtreecommitdiff
path: root/src/gunzip.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gunzip.c')
-rw-r--r--src/gunzip.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gunzip.c b/src/gunzip.c
index ce3eeed..1d641ed 100644
--- a/src/gunzip.c
+++ b/src/gunzip.c
@@ -71,6 +71,9 @@ struct apk_istream *apk_bstream_gunzip(struct apk_bstream *bs)
{
struct apk_gzip_istream *gis;
+ if (bs == NULL)
+ return NULL;
+
gis = malloc(sizeof(struct apk_gzip_istream));
if (gis == NULL)
return NULL;