From 87e55a4ee7a92ab7510fd268717d21dbba6f5cf6 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Mon, 22 Dec 2014 00:33:41 +1000 Subject: _alpm_db_get_pkgcache_hash: check for error when loading pkgcache Signed-off-by: Allan McRae --- lib/libalpm/db.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/libalpm/db.c') 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; -- cgit v1.2.3