summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2014-12-22 00:42:27 +1000
committerAllan McRae <allan@archlinux.org>2014-12-24 11:19:29 +1000
commit46459da39b4a38397f9781435573b7acd5b9004c (patch)
tree115079cc7a1d6f34eecc99ee933a54a6b163a209 /lib
parent895780bd9aa53c0767a9067a166c60b5b0569c6d (diff)
local_db_read: fix memory leak on error
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/be_local.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c
index 93763966..d0e8944d 100644
--- a/lib/libalpm/be_local.c
+++ b/lib/libalpm/be_local.c
@@ -801,6 +801,7 @@ static int local_db_read(alpm_pkg_t *info, alpm_dbinfrq_t inforeq)
alpm_backup_t *backup;
CALLOC(backup, 1, sizeof(alpm_backup_t), goto error);
if(_alpm_split_backup(line, &backup)) {
+ FREE(backup);
goto error;
}
info->backup = alpm_list_add(info->backup, backup);