From 46459da39b4a38397f9781435573b7acd5b9004c Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Mon, 22 Dec 2014 00:42:27 +1000 Subject: local_db_read: fix memory leak on error Signed-off-by: Allan McRae --- lib/libalpm/be_local.c | 1 + 1 file changed, 1 insertion(+) 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); -- cgit v1.2.3-70-g09d2