aboutsummaryrefslogtreecommitdiffstats
path: root/ctrl
diff options
context:
space:
mode:
authorJordan Augé <jordan.auge+fdio@cisco.com>2019-11-17 00:28:04 +0100
committerJordan Augé <jordan.auge+fdio@cisco.com>2019-11-17 00:28:04 +0100
commit5d45b1b26fd4671d8ad2dabee7631ab499862487 (patch)
tree7b1b854e1be067fa92ff07ac99e9b94a4d202b5f /ctrl
parent547acf3eed92d3564139cccf205c852178bcc310 (diff)
[HICN-396] Incorrect error handling order in facemgr during interface creation causes double free
Change-Id: I63f3ac8815611fe83e75edd283eabf4d721bdbac Signed-off-by: Jordan Augé <jordan.auge+fdio@cisco.com>
Diffstat (limited to 'ctrl')
-rw-r--r--ctrl/facemgr/src/api.c6
1 files changed, 4 insertions, 2 deletions
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)