summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/db.c
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2014-12-21 15:33:41 +0100
committerAllan McRae <allan@archlinux.org>2014-12-24 02:19:29 +0100
commit87e55a4ee7a92ab7510fd268717d21dbba6f5cf6 (patch)
tree2a8e1e0cd37b005081fd53c3c8c02186b3dd35f9 /lib/libalpm/db.c
parentcd5e4b89f4564edb1926e18dd857a9d3842c17e4 (diff)
downloadpacman-87e55a4ee7a92ab7510fd268717d21dbba6f5cf6.tar.gz
pacman-87e55a4ee7a92ab7510fd268717d21dbba6f5cf6.tar.xz
_alpm_db_get_pkgcache_hash: check for error when loading pkgcache
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/db.c')
-rw-r--r--lib/libalpm/db.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c
index 466c96f1..11e3a3b0 100644
--- a/lib/libalpm/db.c
+++ b/lib/libalpm/db.c
@@ -542,7 +542,10 @@ alpm_pkghash_t *_alpm_db_get_pkgcache_hash(alpm_db_t *db)
}
if(!(db->status & DB_STATUS_PKGCACHE)) {
- load_pkgcache(db);
+ if(load_pkgcache(db)) {
+ /* handle->error set in local/sync-db-populate */
+ return NULL;
+ }
}
return db->pkgcache;