mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 15:58:50 -05:00
Fix another usage of pkg_new in _alpm_sync_addtarget
Use _alpm_pkg_dup instead. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
d18686a563
commit
553ce8323c
@ -371,8 +371,7 @@ int _alpm_sync_addtarget(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sy
|
||||
if(!_alpm_sync_find(trans->packages, alpm_pkg_get_name(spkg))) {
|
||||
pmpkg_t *dummy = NULL;
|
||||
if(local) {
|
||||
dummy = _alpm_pkg_new(alpm_pkg_get_name(local),
|
||||
alpm_pkg_get_version(local));
|
||||
dummy = _alpm_pkg_dup(local);
|
||||
if(dummy == NULL) {
|
||||
RET_ERR(PM_ERR_MEMORY, -1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user