From 05364528bbb5e1300187da3c3df474b9eaee2138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Sun, 18 Jul 2021 00:11:20 +0300 Subject: [PATCH] adb, convndx: check istream_close result --- src/adb.c | 3 +-- src/app_convndx.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/adb.c b/src/adb.c index 064cf6b..9c167d6 100644 --- a/src/adb.c +++ b/src/adb.c @@ -966,8 +966,7 @@ int adb_c_block_data(struct apk_ostream *os, apk_blob_t hdr, uint32_t size, stru if (r < 0) return r; } - apk_istream_close(is); - return 0; + return apk_istream_close(is); } int adb_c_block_copy(struct apk_ostream *os, struct adb_block *b, struct apk_istream *is, struct adb_verify_ctx *vfy) diff --git a/src/app_convndx.c b/src/app_convndx.c index eb98b5f..21015cb 100644 --- a/src/app_convndx.c +++ b/src/app_convndx.c @@ -43,7 +43,7 @@ static int load_apkindex(void *sctx, const struct apk_file_info *fi, if (strcmp(fi->name, "APKINDEX") == 0) { ctx->found = 1; convert_index(ctx, is); - apk_istream_close(is); + return apk_istream_close(is); } return 0;