Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2008-01-01 19:14:34 -0600
committerDan McGee <dan@archlinux.org>2008-01-01 20:03:24 -0600
commit553ce8323c23fe3259e45b2708184533158501bd (patch)
tree8329b3944c47f0700127999b69ccf9710ade8ace /lib/libalpm
parentd18686a5637c50a8229a0a280f81a1eb9ec34ed0 (diff)
Fix another usage of pkg_new in _alpm_sync_addtarget
Use _alpm_pkg_dup instead. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/sync.c3
1 files changed, 1 insertions, 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);
}