mirror of
https://github.com/moparisthebest/pacman
synced 2025-01-10 21:38:19 -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))) {
|
if(!_alpm_sync_find(trans->packages, alpm_pkg_get_name(spkg))) {
|
||||||
pmpkg_t *dummy = NULL;
|
pmpkg_t *dummy = NULL;
|
||||||
if(local) {
|
if(local) {
|
||||||
dummy = _alpm_pkg_new(alpm_pkg_get_name(local),
|
dummy = _alpm_pkg_dup(local);
|
||||||
alpm_pkg_get_version(local));
|
|
||||||
if(dummy == NULL) {
|
if(dummy == NULL) {
|
||||||
RET_ERR(PM_ERR_MEMORY, -1);
|
RET_ERR(PM_ERR_MEMORY, -1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user