summaryrefslogtreecommitdiff
path: root/src/io_gunzip.c
diff options
context:
space:
mode:
authorthibault.ferrante <thibault.ferrante@gmail.com>2021-01-07 17:21:36 +0100
committerTimo Teräs <timo.teras@iki.fi>2021-01-11 11:31:30 +0200
commit39f5bfd26ab10a754a566fcd238ca2cac5916f91 (patch)
tree364d5d2a8d48ef0467e6dc667d5a5d44761fded6 /src/io_gunzip.c
parentd438cdfbeb13b0f38c0bef321fc767926df0e4e1 (diff)
downloadapk-tools-39f5bfd26ab10a754a566fcd238ca2cac5916f91.tar.gz
apk-tools-39f5bfd26ab10a754a566fcd238ca2cac5916f91.tar.bz2
apk-tools-39f5bfd26ab10a754a566fcd238ca2cac5916f91.tar.xz
apk-tools-39f5bfd26ab10a754a566fcd238ca2cac5916f91.zip
database: Propagate errors when loading an APKINDEX
In case of failure when loading an APKINDEX, no errors are propagated to the user which may uncorrectly interpret the current problem.
Diffstat (limited to 'src/io_gunzip.c')
-rw-r--r--src/io_gunzip.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/io_gunzip.c b/src/io_gunzip.c
index 6faf74f..70f5b6f 100644
--- a/src/io_gunzip.c
+++ b/src/io_gunzip.c
@@ -118,13 +118,15 @@ ret:
return size - gis->zs.avail_out;
}
-static void gzi_close(struct apk_istream *is)
+static int gzi_close(struct apk_istream *is)
{
+ int r;
struct apk_gzip_istream *gis = container_of(is, struct apk_gzip_istream, is);
inflateEnd(&gis->zs);
- apk_istream_close(gis->zis);
+ r = apk_istream_close(gis->zis);
free(gis);
+ return r;
}
static const struct apk_istream_ops gunzip_istream_ops = {