summaryrefslogtreecommitdiff
path: root/src/adb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/adb.c')
-rw-r--r--src/adb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/adb.c b/src/adb.c
index f1a4937..ee992cf 100644
--- a/src/adb.c
+++ b/src/adb.c
@@ -253,11 +253,11 @@ static int __adb_m_stream(struct adb *db, struct apk_istream *is, uint32_t expec
} while (1);
err:
if (r > 0) r = -APKE_ADB_BLOCK;
- if (r == 0) {
+ if (r == 0 || r == -ECANCELED) {
if (!trusted) r = -APKE_SIGNATURE_UNTRUSTED;
else if (!db->adb.ptr) r = -APKE_ADB_BLOCK;
}
- if (r != 0) {
+ if (r != 0 && r != -ECANCELED) {
free(db->adb.ptr);
db->adb = APK_BLOB_NULL;
}