Variable system going out of scope leaks the memory it points to.
Change-Id: I9d2c5dc3cc3b951954e793cf3864f270810d846c
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
{
__STC_LOG_FUNC_ENTER__;
+ ret_value_msg_if(stop_cb == NULL, STC_ERROR_INVALID_PARAMETER,
+ "stop_cb callback is NULL");
+
stc_system_s *system = MALLOC0(stc_system_s, 1);
GIOChannel *gio = NULL;
ret_value_msg_if(system == NULL, STC_ERROR_OUT_OF_MEMORY,
"stc_system_s malloc fail!");
- ret_value_msg_if(stop_cb == NULL, STC_ERROR_INVALID_PARAMETER,
- "stop_cb callback is NULL");
-
g_stop_cb = stop_cb;
/* initializing current classid */