23 Dec
2007
23 Dec
'07
1:05 p.m.
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index 7661866..0a8170c 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -675,7 +675,9 @@ int _alpm_sync_prepare(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sync if(deps) { pm_errno = PM_ERR_UNSATISFIED_DEPS; ret = -1; - *data = deps; + if(data) { + *data = deps; + } goto cleanup; } } Some little comments: If you don't keep the result, you should free deps list with FREELIST().
And the same for the allocated errormsg strings <- here you can put the whole {calloc, snprintf, alpm_list_add} block to if(data). Bye