Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/db.c
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2014-12-24 12:26:39 +1000
committerAllan McRae <allan@archlinux.org>2014-12-27 17:08:32 +1000
commit2f0ca00e5530d38e8ee2005f7d1129a92bf34231 (patch)
tree4ce9ac992e090410f5ab62475a032af843ec9f62 /lib/libalpm/db.c
parent60d958c78bf5c6fca761492b4849dd36f098eb41 (diff)
_alpm_db_add_pkgincache: free potential memory leak
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/db.c')
-rw-r--r--lib/libalpm/db.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c
index 0ca12d70..bfc80ac8 100644
--- a/lib/libalpm/db.c
+++ b/lib/libalpm/db.c
@@ -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;
}