From 553ce8323c23fe3259e45b2708184533158501bd Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 1 Jan 2008 19:14:34 -0600 Subject: Fix another usage of pkg_new in _alpm_sync_addtarget Use _alpm_pkg_dup instead. Signed-off-by: Dan McGee --- lib/libalpm/sync.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index 224f5676..dd54ce6c 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -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); } -- cgit v1.2.3-70-g09d2