_alpm_recursedeps: free memory on error
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
32413213cb
commit
be4198b34e
1 changed files with 2 additions and 0 deletions
|
@ -614,6 +614,8 @@ int _alpm_recursedeps(alpm_db_t *db, alpm_list_t **targs, int include_explicit)
|
||||||
deppkg->name);
|
deppkg->name);
|
||||||
/* add it to the target list */
|
/* add it to the target list */
|
||||||
if(_alpm_pkg_dup(deppkg, ©)) {
|
if(_alpm_pkg_dup(deppkg, ©)) {
|
||||||
|
/* we return memory on "non-fatal" error in _alpm_pkg_dup */
|
||||||
|
_alpm_pkg_free(copy);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
*targs = alpm_list_add(*targs, copy);
|
*targs = alpm_list_add(*targs, copy);
|
||||||
|
|
Loading…
Add table
Reference in a new issue