diff options
author | Jordan Augé <jordan.auge+fdio@cisco.com> | 2019-11-17 00:28:04 +0100 |
---|---|---|
committer | Jordan Augé <jordan.auge+fdio@cisco.com> | 2019-11-17 00:28:04 +0100 |
commit | 5d45b1b26fd4671d8ad2dabee7631ab499862487 (patch) | |
tree | 7b1b854e1be067fa92ff07ac99e9b94a4d202b5f /ctrl/facemgr | |
parent | 547acf3eed92d3564139cccf205c852178bcc310 (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/facemgr')
-rw-r--r-- | ctrl/facemgr/src/api.c | 6 |
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) |