From cd2daa51895976b6d5d9a99ba6ced0b547aab1d3 Mon Sep 17 00:00:00 2001 From: Aurelien Foret Date: Mon, 2 Jan 2006 13:15:08 +0000 Subject: fixed possible memory corruption --- lib/libalpm/add.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index 3a610c85..404e0619 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -364,7 +364,7 @@ int add_commit(pmtrans_t *trans, pmdb_t *db) } /* copy the skiplist over */ for(lp = trans->skiplist; lp; lp = lp->next) { - tr->skiplist = pm_list_add(tr->skiplist, lp->data); + tr->skiplist = pm_list_add(tr->skiplist, strdup(lp->data)); } if(remove_commit(tr, db) == -1) { FREETRANS(tr); -- cgit v1.2.3-24-g4f1b