From c0f18e86f12d563b775eb584ccf0a93ebc617ac6 Mon Sep 17 00:00:00 2001 From: Suyeon Hwang Date: Wed, 9 Nov 2022 13:34:51 +0900 Subject: [PATCH] Reset g_mgr_client when client is destroyed - Issue: App can access g_mgr_client even if vc mgr was deinitialized. - Solution: VC mgr client module did not assign null in g_mgr_client when vc_mgr_client_destroy() is invoked. Thus, app still can access the dereferenced pointer in g_mgr_client after calling vc_mgr_deinitialized(). This patch sets null in g_mgr_client when app invokes the vc_mgr_deinitialize(). Through this patch, the client structure of vc mgr is properly reset. Change-Id: I8c20e70960607257fa5e80b961c610b5aaf51f9a Signed-off-by: Suyeon Hwang --- client/vc_mgr_client.c | 1 + 1 file changed, 1 insertion(+) diff --git a/client/vc_mgr_client.c b/client/vc_mgr_client.c index 867f9d3..e590383 100644 --- a/client/vc_mgr_client.c +++ b/client/vc_mgr_client.c @@ -228,6 +228,7 @@ int vc_mgr_client_destroy() } free(g_mgr_client); + g_mgr_client = NULL; return VC_ERROR_NONE; } -- 2.7.4