From 6d328ea1369f42b6a5658d548461991585534631 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Wed, 27 Sep 2017 13:51:13 +0200 Subject: file_list: Fix memory leak in failure path In case of a parse error not only the list header has to be freed, but also the entries. Use file_list_free() for this purpose. Signed-off-by: Sascha Hauer --- common/file-list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/file-list.c b/common/file-list.c index e13d5af659..be8f53bd89 100644 --- a/common/file-list.c +++ b/common/file-list.c @@ -122,7 +122,7 @@ struct file_list *file_list_parse(const char *str) return files; out: - free(files); + file_list_free(files); return ERR_PTR(ret); } -- cgit v1.2.3