index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2011-05-04 15:48:47 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-05-04 15:48:47 -0500 |
commit | e8a40526cb3be82c5019f0ee3f592a08b3387fa9 (patch) | |
tree | df47b16beb2dfcfd42d2bc94379725082b653f7c /lib/libalpm | |
parent | c03faa32f335f3fb7bc1bc8718dd1781781ef3dd (diff) |
-rw-r--r-- | lib/libalpm/conflict.c | 8 |
diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c index 319e49d6..fbc988bd 100644 --- a/lib/libalpm/conflict.c +++ b/lib/libalpm/conflict.c @@ -287,7 +287,7 @@ static alpm_list_t *add_fileconflict(alpm_list_t *conflicts, if(name2) { STRDUP(conflict->ctarget, name2, RET_ERR(PM_ERR_MEMORY, NULL)); } else { - conflict->ctarget = ""; + STRDUP(conflict->ctarget, "", RET_ERR(PM_ERR_MEMORY, NULL)); } conflicts = alpm_list_add(conflicts, conflict); @@ -299,10 +299,8 @@ static alpm_list_t *add_fileconflict(alpm_list_t *conflicts, void _alpm_fileconflict_free(pmfileconflict_t *conflict) { - if(strlen(conflict->ctarget) > 0) { - FREE(conflict->ctarget); - } - FREE(conflict->file);; + FREE(conflict->ctarget); + FREE(conflict->file); FREE(conflict->target); FREE(conflict); } |