index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2012-02-29 16:33:21 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-03-05 11:44:34 -0600 |
commit | 4b384b7f0b0e840e09e3bffd2dbb59b88bdd4864 (patch) | |
tree | 4f54602267e83c2f5a75b4bdb165b8bafd08cb3a /lib | |
parent | d1151b5ab9c407732ded462a0fe0259dea8dcc2a (diff) |
-rw-r--r-- | lib/libalpm/be_package.c | 6 |
diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c index 4d9d0e82..ad34640a 100644 --- a/lib/libalpm/be_package.c +++ b/lib/libalpm/be_package.c @@ -382,7 +382,7 @@ alpm_pkg_t *_alpm_pkg_load_internal(alpm_handle_t *handle, /* try to create an archive object to read in the package */ if((archive = archive_read_new()) == NULL) { - alpm_pkg_free(newpkg); + _alpm_pkg_free(newpkg); RET_ERR(handle, ALPM_ERR_LIBARCHIVE, NULL); } @@ -391,8 +391,8 @@ alpm_pkg_t *_alpm_pkg_load_internal(alpm_handle_t *handle, if(archive_read_open_filename(archive, pkgfile, ALPM_BUFFER_SIZE) != ARCHIVE_OK) { - alpm_pkg_free(newpkg); - RET_ERR(handle, ALPM_ERR_PKG_OPEN, NULL); + handle->pm_errno = ALPM_ERR_PKG_OPEN; + goto error; } _alpm_log(handle, ALPM_LOG_DEBUG, "starting package load for %s\n", pkgfile); |