load_packages: fix memory leak on error
The memory assigned in _alpm_pkg_load_internal was not freed on error. Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
19a8587459
commit
775d511f42
1 changed files with 1 additions and 0 deletions
|
@ -1109,6 +1109,7 @@ static int load_packages(alpm_handle_t *handle, alpm_list_t **data,
|
||||||
errors++;
|
errors++;
|
||||||
*data = alpm_list_add(*data, strdup(spkg->filename));
|
*data = alpm_list_add(*data, strdup(spkg->filename));
|
||||||
free(filepath);
|
free(filepath);
|
||||||
|
_alpm_pkg_free(pkgfile);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
free(filepath);
|
free(filepath);
|
||||||
|
|
Loading…
Add table
Reference in a new issue