Fix the svace issue (MEMORY_LEAK.EX) 23/253623/1
authorDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 8 Feb 2021 00:28:53 +0000 (09:28 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 16 Feb 2021 04:59:50 +0000 (13:59 +0900)
Change-Id: Ifdd12ab5dc05094479644522250090acbcea1cbb
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
standard/bt-main-view.c

index 4eeb48d..023e6fc 100644 (file)
@@ -3960,8 +3960,6 @@ void __bt_main_parse_service(bt_ug_data *ugd, app_control_h service)
        BT_INFO("operation: %s", operation);
 
        if (g_strcmp0(operation, APP_CONTROL_OPERATION_SHARE) == 0) {
-               char *mime = NULL;
-
                launch_type = strdup("send");
 
                app_control_get_mime(service, &mime);
@@ -4055,6 +4053,7 @@ void __bt_main_parse_service(bt_ug_data *ugd, app_control_h service)
                }
 
                g_free(mime);
+               mime = NULL;
        } else if (g_strcmp0(operation, APP_CONTROL_OPERATION_SHARE_TEXT) == 0) {
                BT_DBG("APP_CONTROL_OPERATION_SHARE_TEXT");
 
@@ -4097,7 +4096,6 @@ void __bt_main_parse_service(bt_ug_data *ugd, app_control_h service)
                char **array_value = NULL;
                int array_length;
                int ret, i;
-               char *mime = NULL;
 
                launch_type = strdup("send");
 
@@ -4166,6 +4164,7 @@ void __bt_main_parse_service(bt_ug_data *ugd, app_control_h service)
                }
 
                g_free(mime);
+               mime = NULL;
        } else if (g_strcmp0(operation, BT_APPCONTROL_PICK_OPERATION) == 0) {
                BT_DBG("Pick Operation");
                launch_type = strdup("pick");