index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2011-08-19 11:06:55 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-08-19 11:09:57 -0500 |
commit | 6d544984f2418ea34caab4c433580487b760362a (patch) | |
tree | cf0510b97a6495587c87598a70bf8761189f5c32 /lib/libalpm/sync.c | |
parent | 9934b3bd345011eef6a96249d8d90de594c04cd0 (diff) |
-rw-r--r-- | lib/libalpm/sync.c | 6 |
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index 6c30c948..e3e7fa90 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -558,8 +558,12 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data) for(j = spkg->removes; j; j = j->next) { alpm_pkg_t *rpkg = j->data; if(!_alpm_pkg_find(trans->remove, rpkg->name)) { + alpm_pkg_t *copy; _alpm_log(handle, ALPM_LOG_DEBUG, "adding '%s' to remove list\n", rpkg->name); - trans->remove = alpm_list_add(trans->remove, _alpm_pkg_dup(rpkg)); + if(_alpm_pkg_dup(rpkg, ©) == -1) { + return -1; + } + trans->remove = alpm_list_add(trans->remove, copy); } } } |