index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2011-01-24 21:46:42 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-01-24 21:46:42 -0600 |
commit | fe76c353af6d91ce9f225dc2b0195a689f6790da (patch) | |
tree | e480604972f29822e8652883b8d97be4e2b113e0 | |
parent | 0f24390fe8967f25d7fce4665d5b635fa66a3c4f (diff) |
-rw-r--r-- | lib/libalpm/be_sync.c | 5 |
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c index 4676e8a6..8c67bb19 100644 --- a/lib/libalpm/be_sync.c +++ b/lib/libalpm/be_sync.c @@ -166,7 +166,8 @@ static int sync_db_populate(pmdb_t *db) ARCHIVE_DEFAULT_BYTES_PER_BLOCK) != ARCHIVE_OK) { _alpm_log(PM_LOG_ERROR, _("could not open %s: %s\n"), _alpm_db_path(db), archive_error_string(archive)); - RET_ERR(PM_ERR_PKG_OPEN, 1); + archive_read_finish(archive); + RET_ERR(PM_ERR_DB_OPEN, 1); } while(archive_read_next_header(archive, &entry) == ARCHIVE_OK) { @@ -180,7 +181,7 @@ static int sync_db_populate(pmdb_t *db) pkg = _alpm_pkg_new(); if(pkg == NULL) { archive_read_finish(archive); - return(-1); + RET_ERR(PM_ERR_MEMORY, -1); } name = archive_entry_pathname(entry); |