From db8a5e358617038b3e884a13462a4f0163b56cc5 Mon Sep 17 00:00:00 2001 From: Aurelien Foret Date: Fri, 6 Jan 2006 22:58:01 +0000 Subject: - sync: populates *data when a conflict can't be resolved - add: code cleanup --- lib/libalpm/add.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/libalpm/add.c') diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index b7f1aa90..8f3d03ce 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -242,7 +242,11 @@ int add_prepare(pmtrans_t *trans, pmdb_t *db, PMList **data) if(!errorout) { errorout = 1; } - MALLOC(miss, sizeof(pmdepmissing_t)); + if((miss = (pmdepmissing_t *)malloc(sizeof(pmdepmissing_t))) == NULL) { + FREELIST(lp); + FREELIST(*data); + RET_ERR(PM_ERR_MEMORY, -1); + } *miss = *(pmdepmissing_t*)i->data; *data = pm_list_add(*data, miss); } -- cgit v1.2.3-24-g4f1b