index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | lib/libalpm/be_local.c | 4 |
diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c index c5b24982..58582705 100644 --- a/lib/libalpm/be_local.c +++ b/lib/libalpm/be_local.c @@ -393,6 +393,10 @@ static int local_db_populate(pmdb_t *db) /* initialize hash at 50% full */ db->pkgcache = _alpm_pkghash_create(est_count * 2); + if(db->pkgcache == NULL){ + closedir(dbdir); + RET_ERR(PM_ERR_MEMORY, -1); + } while((ent = readdir(dbdir)) != NULL) { const char *name = ent->d_name; |