From b27867055ba3a9545824f2c48862a072175e0e21 Mon Sep 17 00:00:00 2001 From: Hongjun Ni Date: Fri, 1 Feb 2019 17:06:27 +0800 Subject: Fix reconnect failure issue Change-Id: I6b809f4f025d9b2ce3bef2ef2c1a499758883b69 Signed-off-by: Xiaobo Chen Signed-off-by: Hongjun Ni --- src/plugins/bapi/bapi.c | 1 + src/scvpp/src/sc_vpp_comm.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/plugins/bapi/bapi.c b/src/plugins/bapi/bapi.c index 25939cf..49107ff 100644 --- a/src/plugins/bapi/bapi.c +++ b/src/plugins/bapi/bapi.c @@ -46,6 +46,7 @@ vapi_error_e bin_api_connect(const char *client_name, vapi_mode_e vapi_mode) { if (VAPI_OK != rv) { SC_LOG_DBG_MSG("error: connecting to vlib"); + vapi_ctx_free(g_vapi_ctx); return rv; } diff --git a/src/scvpp/src/sc_vpp_comm.c b/src/scvpp/src/sc_vpp_comm.c index 0df9426..9059ff7 100644 --- a/src/scvpp/src/sc_vpp_comm.c +++ b/src/scvpp/src/sc_vpp_comm.c @@ -32,6 +32,7 @@ int sc_connect_vpp() if (rv != VAPI_OK) { SC_LOG_ERR("*connect %s faild,with return %d", APP_NAME, rv); + vapi_ctx_free(g_vapi_ctx_instance); return -1; } SC_LOG_DBG("*connected %s ok", APP_NAME); -- cgit 1.2.3-korg