mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 07:48:50 -05:00
_alpm_db_add_pkgincache: free potential memory leak
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
60d958c78b
commit
2f0ca00e55
@ -572,6 +572,8 @@ int _alpm_db_add_pkgincache(alpm_db_t *db, alpm_pkg_t *pkg)
|
||||
}
|
||||
|
||||
if(_alpm_pkg_dup(pkg, &newpkg)) {
|
||||
/* we return memory on "non-fatal" error in _alpm_pkg_dup */
|
||||
_alpm_pkg_free(newpkg);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user