diff options
Diffstat (limited to 'src/package.c')
-rw-r--r-- | src/package.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/package.c b/src/package.c index 71d1023..7111968 100644 --- a/src/package.c +++ b/src/package.c @@ -903,8 +903,10 @@ int apk_pkg_read(struct apk_database *db, const char *file, if (ctx.pkg == NULL) goto err; bs = apk_bstream_from_file(AT_FDCWD, file); - if (bs == NULL) + if (IS_ERR_OR_NULL(bs)) { + r = PTR_ERR(bs) ?: -EIO; goto err; + } ctx.db = db; ctx.pkg->size = fi.size; |