From 4dc41f996ec9f35f553b12f713b5f19f56d50097 Mon Sep 17 00:00:00 2001 From: Simos Xenitellis Date: Tue, 15 May 2018 00:19:12 +0000 Subject: [PATCH] coverity: #1425836 Resource leak Signed-off-by: Simos Xenitellis --- src/lxc/conf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index e854b8b03..48f4fef38 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -4082,8 +4082,10 @@ struct lxc_list *get_minimal_idmap(struct lxc_conf *conf) return idmap; on_error: - if (idmap) + if (idmap) { lxc_free_idmap(idmap); + free(idmap); + } if (container_root_uid) free(container_root_uid); if (container_root_gid) -- 2.47.2