From 5d45b1b26fd4671d8ad2dabee7631ab499862487 Mon Sep 17 00:00:00 2001 From: Jordan Augé Date: Sun, 17 Nov 2019 00:28:04 +0100 Subject: [HICN-396] Incorrect error handling order in facemgr during interface creation causes double free MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I63f3ac8815611fe83e75edd283eabf4d721bdbac Signed-off-by: Jordan Augé --- ctrl/facemgr/src/api.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ctrl') diff --git a/ctrl/facemgr/src/api.c b/ctrl/facemgr/src/api.c index 23ca2f2ae..c1f7eeffa 100644 --- a/ctrl/facemgr/src/api.c +++ b/ctrl/facemgr/src/api.c @@ -417,11 +417,13 @@ facemgr_create_interface(facemgr_t * facemgr, const char * name, const char * ty *pinterface = interface; return 0; + + //interface_finalize(interface); +ERR_INIT: + interface_map_remove(facemgr->interface_map, interface->name, NULL); ERR_MAP_ADD: free(interface_map_data); ERR_MAP_DATA: - interface_finalize(interface); -ERR_INIT: interface_free(interface); ERR_CREATE: if (pinterface) -- cgit 1.2.3-korg