fixed coverity issue 43/154743/2 accepted/tizen/4.0/unified/20171012.074434 submit/tizen_4.0/20171011.102747 tizen_4.0.IoT.p1_release
authorYounho Park <younho.park@samsung.com>
Wed, 11 Oct 2017 08:16:13 +0000 (17:16 +0900)
committerYounho Park <younho.park@samsung.com>
Wed, 11 Oct 2017 10:21:43 +0000 (19:21 +0900)
Change-Id: Ife8ac5e3df9c6e75078cc6259dae2e4dd9293e50
Signed-off-by: Younho Park <younho.park@samsung.com>
api/client/src/dbus/dbus_client.c
server/src/dbus/dbus-auth-adaptor.c
server/src/dbus/dbus-contact-adaptor.c
server/src/dbus/dbus-message-adaptor.c
server/src/dbus/dbus-push-adaptor.c
server/src/dbus/dbus-shop-adaptor.c
server/src/dbus/dbus-storage-adaptor.c
server/src/service-adaptor.c

index 673adda8eec834228623131217b69ceac4ff8437..9c2009e428b01c5f3cb125fd8a478a29d1366b05 100644 (file)
@@ -727,6 +727,7 @@ int _dbus_start_service(service_plugin_h plugin,
                g_variant_unref(call_result);
        }
 
+       g_variant_builder_unref(builder_property);
        return ret;
 }
 
index 4bf8156ae776b9ea4886c082a59ff7119de2f391..38e2dcbab0341ad21c7f1f4e4d9b6fcbf18ab3e8 100644 (file)
@@ -93,6 +93,7 @@ FUNC_STEP();
 
                        g_variant_builder_unref(builder);
                        free(imsi);
+                       g_variant_unref(in_parameters);
                        return;
                }
 
@@ -326,6 +327,7 @@ FUNC_STEP();
                for (size_t j = 0; j < private_service_adaptor_set_auth_s_type_length; j++) {
                        g_variant_unref(req_struct[j]);
                }
+               g_variant_unref(in_parameters);
 
                g_dbus_method_invocation_return_value(invocation, g_variant_new("(ts)", (uint64_t) ret_code, ret_msg));
                SERVICE_ADAPTOR_API_TIME_CHECK_PAUSE();
index d1691dbe84b744014f76b877e395bbcafb7fcfce..e7b1228df1d729f29067a4b44138914d0e2e6266 100644 (file)
@@ -139,6 +139,7 @@ FUNC_STEP();
                                                g_variant_unref(req_info_struct[j]);
                                        }
                                }
+                               g_variant_unref(req_info_entry_v);
                                (*contact_req)->cts[i] = contact_info_req;
                        }
                }
@@ -307,6 +308,7 @@ FUNC_STEP();
                                (*profile_req)->evnt[i] = ipc_g_variant_dup_string(evnt_info_struct);
 
                                g_variant_unref(evnt_info_struct);
+                               g_variant_unref(evnt_info_entry_v);
                        }
                }
                idx++;
@@ -328,6 +330,7 @@ FUNC_STEP();
                                (*profile_req)->adrs[i] = ipc_g_variant_dup_string(adrs_info_struct);
 
                                g_variant_unref(adrs_info_struct);
+                               g_variant_unref(adrs_info_entry_v);
                        }
                }
                idx++;
@@ -348,6 +351,7 @@ FUNC_STEP();
                                (*profile_req)->mail[i] = ipc_g_variant_dup_string(mail_info_struct);
 
                                g_variant_unref(mail_info_struct);
+                               g_variant_unref(mail_info_entry_v);
                        }
                }
                idx++;
@@ -402,6 +406,7 @@ FUNC_STEP();
        for (size_t j = 0; j < private_service_adaptor_essential_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 FUNC_END();
 }
 
@@ -459,16 +464,20 @@ FUNC_STEP();
                        if (NULL != (*req_imgs)[i]) {
                                GVariant *path_info_struct;
                                GVariant *path_info_entry_v = g_variant_get_child_value(req_struct[idx], i);
+
                                path_info_struct = g_variant_get_child_value(path_info_entry_v, 0);
                                (*req_imgs)[i]->req_type = g_variant_get_int32(path_info_struct);
+                               g_variant_unref(path_info_struct);
 
                                path_info_struct = g_variant_get_child_value(path_info_entry_v, 1);
                                (*req_imgs)[i]->no = g_variant_get_int32(path_info_struct);
+                               g_variant_unref(path_info_struct);
 
                                path_info_struct = g_variant_get_child_value(path_info_entry_v, 2);
                                (*req_imgs)[i]->img = ipc_g_variant_dup_string(path_info_struct);
-
                                g_variant_unref(path_info_struct);
+
+                               g_variant_unref(path_info_entry_v);
                        }
                }
                idx++;
@@ -756,7 +765,7 @@ FUNC_STEP();
                                contact_adaptor_destroy_error_code(&error_code);
 
                                service_adaptor_debug("Re-try API");
-                               ret_code = contact_adaptor_set_contact_list(plugin, service->contact_context, contact_req, NULL, &contact_res, &error_code, NULL);
+                               contact_adaptor_set_contact_list(plugin, service->contact_context, contact_req, NULL, &contact_res, &error_code, NULL);
                        }
                }
 
@@ -840,7 +849,7 @@ FUNC_STEP();
                                contact_adaptor_destroy_error_code(&error_code);
 
                                service_adaptor_debug("Re-try API");
-                               ret_code = contact_adaptor_get_contact_infos_latest(plugin, service->contact_context, NULL, NULL, &contact_res, &error_code, NULL);
+                               contact_adaptor_get_contact_infos_latest(plugin, service->contact_context, NULL, NULL, &contact_res, &error_code, NULL);
                        }
                }
 
@@ -915,7 +924,7 @@ FUNC_STEP();
                                contact_adaptor_destroy_error_code(&error_code);
 
                                service_adaptor_debug("Re-try API");
-                               ret_code = contact_adaptor_get_contact_infos_polling(plugin, service->contact_context, contact_req, NULL, &contact_res, &error_code, NULL);
+                               contact_adaptor_get_contact_infos_polling(plugin, service->contact_context, contact_req, NULL, &contact_res, &error_code, NULL);
                        }
                }
 
@@ -989,7 +998,7 @@ FUNC_STEP();
                                contact_adaptor_destroy_error_code(&error_code);
 
                                service_adaptor_debug("Re-try API");
-                               ret_code = contact_adaptor_set_me_profile_with_push(plugin, service->contact_context, profile_req, NULL, &profile_res, &error_code, NULL);
+                               contact_adaptor_set_me_profile_with_push(plugin, service->contact_context, profile_req, NULL, &profile_res, &error_code, NULL);
                        }
                }
 
@@ -1065,7 +1074,7 @@ FUNC_STEP();
                                contact_adaptor_destroy_error_code(&error_code);
 
                                service_adaptor_debug("Re-try API");
-                               ret_code = contact_adaptor_get_profile(plugin, service->contact_context, profile_req, NULL, &profile_res, &error_code, NULL);
+                               contact_adaptor_get_profile(plugin, service->contact_context, profile_req, NULL, &profile_res, &error_code, NULL);
                        }
                }
 
@@ -1172,7 +1181,7 @@ FUNC_STEP();
                                        storage_adaptor_destroy_error_code(&storage_error_code);
 
                                        service_adaptor_debug("Re-try API");
-                                       ret_code = storage_adaptor_upload_file_sync(storage_plugin, service->storage_context,
+                                       storage_adaptor_upload_file_sync(storage_plugin, service->storage_context,
                                                        parent_folder, file_name, req_imgs[i]->img, true, NULL, &file_info, &storage_error_code, NULL);
                                }
 
@@ -1228,7 +1237,7 @@ FUNC_STEP();
                                        contact_adaptor_destroy_error_code(&contact_error_code);
 
                                        service_adaptor_debug("Re-try API");
-                                       ret_code = contact_adaptor_set_me_profile_image_meta_with_push(contact_plugin,
+                                       contact_adaptor_set_me_profile_image_meta_with_push(contact_plugin,
                                                        service->contact_context, tmp_imgs, tmp_imgs_len, NULL, &contact_error_code, NULL);
                                }
 
@@ -1310,7 +1319,7 @@ FUNC_STEP();
                                contact_adaptor_destroy_error_code(&error_code);
 
                                service_adaptor_debug("Re-try API");
-                               ret_code = contact_adaptor_delete_me_profile_image_meta_with_push(plugin, service->contact_context,  NULL, &error_code, NULL);
+                               contact_adaptor_delete_me_profile_image_meta_with_push(plugin, service->contact_context,  NULL, &error_code, NULL);
                        }
                }
 
@@ -1381,7 +1390,7 @@ FUNC_STEP();
                                contact_adaptor_destroy_error_code(&error_code);
 
                                service_adaptor_debug("Re-try API");
-                               ret_code = contact_adaptor_set_me_profile_privacy(plugin, service->contact_context, privacy_req, NULL, &privacy_res, &error_code, NULL);
+                               contact_adaptor_set_me_profile_privacy(plugin, service->contact_context, privacy_req, NULL, &privacy_res, &error_code, NULL);
                        }
                }
 
@@ -1443,6 +1452,7 @@ FUNC_STEP();
 
                        contact_adaptor_destroy_privacy_res_s(privacy_res);
                        free(service_name);
+                       g_variant_unref(in_parameters);
                        return;
                }
 
@@ -1465,7 +1475,7 @@ FUNC_STEP();
                                contact_adaptor_destroy_error_code(&error_code);
 
                                service_adaptor_debug("Re-try API");
-                               ret_code = contact_adaptor_get_me_profile_privacy(plugin, service->contact_context, NULL, NULL, &privacy_res, &error_code, NULL);
+                               contact_adaptor_get_me_profile_privacy(plugin, service->contact_context, NULL, NULL, &privacy_res, &error_code, NULL);
                        }
                }
 
@@ -1540,7 +1550,7 @@ FUNC_STEP();
                                contact_adaptor_destroy_error_code(&error_code);
 
                                service_adaptor_debug("Re-try API");
-                               ret_code = contact_adaptor_set_me_presence_with_push(plugin, service->contact_context, presence_req, NULL, &presence_res, &error_code, NULL);
+                               contact_adaptor_set_me_presence_with_push(plugin, service->contact_context, presence_req, NULL, &presence_res, &error_code, NULL);
                        }
                }
 
@@ -1616,7 +1626,7 @@ FUNC_STEP();
                                contact_adaptor_destroy_error_code(&error_code);
 
                                service_adaptor_debug("Re-try API");
-                               ret_code = contact_adaptor_set_me_presence_on_off_with_push(plugin, service->contact_context, presence_req, NULL, &presence_res, &error_code, NULL);
+                               contact_adaptor_set_me_presence_on_off_with_push(plugin, service->contact_context, presence_req, NULL, &presence_res, &error_code, NULL);
                        }
                }
 
@@ -1687,7 +1697,7 @@ FUNC_STEP();
                                contact_adaptor_destroy_error_code(&error_code);
 
                                service_adaptor_debug("Re-try API");
-                               ret_code = contact_adaptor_set_me_profile_type(plugin, service->contact_context, type, NULL, &url, &error_code, NULL);
+                               contact_adaptor_set_me_profile_type(plugin, service->contact_context, type, NULL, &url, &error_code, NULL);
                        }
                }
 
index fa31faf5e3fdeaa1b77d4549d112684cd2f44f9f..6b0bdd0a5683f3dc1120859e48934dec50ed28b3 100644 (file)
@@ -69,6 +69,8 @@ void __get_create_chatroom_req_type(GVariant *parameters,
 
                        info_struct = g_variant_get_child_value(info_entry_v, 0);
                        (*receivers)[i] = g_variant_get_int64(info_struct);
+                       g_variant_unref(info_struct);
+                       g_variant_unref(info_entry_v);
                }
                idx++;
                *receivers_len = g_variant_get_uint32(req_struct[idx++]);
@@ -82,6 +84,7 @@ void __get_create_chatroom_req_type(GVariant *parameters,
        for (size_t j = 0; j < private_service_adaptor_create_chatroom_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 void __get_change_chatroom_meta_req_type(GVariant *parameters,
@@ -108,6 +111,7 @@ void __get_change_chatroom_meta_req_type(GVariant *parameters,
        for (size_t j = 0; j < private_service_adaptor_change_chatroom_meta_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 void __get_chat_req_type(GVariant *parameters,
@@ -165,6 +169,7 @@ void __get_chat_req_type(GVariant *parameters,
        for (size_t j = 0; j < private_service_adaptor_chat_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 void __get_allow_chat_req_type(GVariant *parameters,
@@ -201,6 +206,7 @@ void __get_allow_chat_req_type(GVariant *parameters,
        for (size_t j = 0; j < private_service_adaptor_allow_chat_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 void __get_all_unread_message_req_type(GVariant *parameters,
@@ -223,6 +229,7 @@ void __get_all_unread_message_req_type(GVariant *parameters,
        for (size_t j = 0; j < private_service_adaptor_all_unread_message_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 void __get_forward_online_message_res_type(GVariant *parameters,
@@ -247,6 +254,7 @@ void __get_forward_online_message_res_type(GVariant *parameters,
        for (size_t j = 0; j < private_service_adaptor_forward_online_message_res_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 void __get_forward_unread_message_res_type(GVariant *parameters,
@@ -271,6 +279,7 @@ void __get_forward_unread_message_res_type(GVariant *parameters,
        for (size_t j = 0; j < private_service_adaptor_forward_unread_message_res_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 void __get_read_message_req_type(GVariant *parameters,
@@ -317,6 +326,7 @@ void __get_read_message_req_type(GVariant *parameters,
        for (size_t j = 0; j < private_service_adaptor_read_message_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 void __get_invite_chat_req_type(GVariant *parameters,
@@ -362,6 +372,7 @@ void __get_invite_chat_req_type(GVariant *parameters,
        for (size_t j = 0; j < private_service_adaptor_invite_chat_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 void __get_end_chat_req_type(GVariant *parameters,
@@ -416,6 +427,7 @@ void __get_end_chat_req_type(GVariant *parameters,
        for (size_t j = 0; j < private_service_adaptor_end_chat_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 void __get_unseal_message_req_type(GVariant *parameters,
@@ -444,6 +456,7 @@ void __get_unseal_message_req_type(GVariant *parameters,
        for (size_t j = 0; j < private_service_adaptor_unseal_message_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 void __get_save_call_log_req_type(GVariant *parameters,
@@ -476,6 +489,7 @@ void __get_save_call_log_req_type(GVariant *parameters,
        for (size_t j = 0; j < private_service_adaptor_save_call_log_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 void __get_current_time_req_type(GVariant *parameters,
@@ -496,6 +510,7 @@ void __get_current_time_req_type(GVariant *parameters,
        for (size_t j = 0; j < private_service_adaptor_current_time_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 void __get_get_connection_policy_req_type(GVariant *parameters,
@@ -514,6 +529,7 @@ void __get_get_connection_policy_req_type(GVariant *parameters,
        for (size_t j = 0; j < private_service_adaptor_get_connection_policy_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 void __get_set_connection_policy_req_type(GVariant *parameters,
@@ -534,6 +550,7 @@ void __get_set_connection_policy_req_type(GVariant *parameters,
        for (size_t j = 0; j < private_service_adaptor_set_connection_policy_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 
@@ -587,6 +604,7 @@ void __get_chat_id_list_req_type(GVariant *parameters,
        for (size_t j = 0; j < private_service_adaptor_chat_id_list_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 void __get_msisdn_list_req_type(GVariant *parameters,
@@ -615,6 +633,7 @@ void __get_msisdn_list_req_type(GVariant *parameters,
                        (*chat_ids)[i] = g_variant_get_int64(info_struct);
 
                        g_variant_unref(info_struct);
+                       g_variant_unref(info_entry_v);
                }
                idx++;
 
@@ -627,6 +646,7 @@ void __get_msisdn_list_req_type(GVariant *parameters,
        for (size_t j = 0; j < private_service_adaptor_msisdn_list_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 GVariant *__create_chat_id_list_res_type(message_adaptor_chat_id_s **chat_ids,
@@ -881,7 +901,10 @@ void message_adaptor_method_call(GDBusConnection *connection,
                                        }
                                }
                                free(chat_msgs);
+                               chat_msgs = NULL;
                        }
+                       if (chat_msgs != NULL)
+                               free(chat_msgs);
                        return;
                }
 
@@ -949,7 +972,10 @@ void message_adaptor_method_call(GDBusConnection *connection,
                                }
                        }
                        free(chat_msgs);
+                       chat_msgs = NULL;
                }
+               if (NULL != chat_msgs)
+                       free(chat_msgs);
        } else if (0 == g_strcmp0(method_name, PRIVATE_DBUS_REQUEST_ALLOW_CHAT_METHOD)) {
                char *service_name = NULL;
                int64_t request_id = 0;
@@ -1513,7 +1539,10 @@ void message_adaptor_method_call(GDBusConnection *connection,
                                        free(end_chats[i]);
                                }
                                free(end_chats);
+                               end_chats = NULL;
                        }
+                       if (end_chats != NULL)
+                               free(end_chats);
                        return;
                }
 
@@ -1576,7 +1605,10 @@ void message_adaptor_method_call(GDBusConnection *connection,
                                free(end_chats[i]);
                        }
                        free(end_chats);
+                       end_chats = NULL;
                }
+               if (NULL != end_chats)
+                       free(end_chats);
        } else if (0 == g_strcmp0(method_name, PRIVATE_DBUS_REQUEST_UNSEAL_MESSAGE_METHOD)) {
                char *service_name = NULL;
                int64_t request_id = 0;
@@ -1919,7 +1951,6 @@ void message_adaptor_method_call(GDBusConnection *connection,
                unsigned int phone_number_len = 0;
                message_adaptor_chat_id_s **chat_ids = NULL;
                unsigned int chat_ids_len = 0;
-               void *user_data = NULL;
                void *server_data = NULL;
                message_adaptor_error_code_t *error_code = NULL;
                message_adaptor_error_code_t _error;
@@ -1952,7 +1983,10 @@ void message_adaptor_method_call(GDBusConnection *connection,
                                        }
                                }
                                free(phone_number);
+                               phone_number = NULL;
                        }
+                       if (phone_number != NULL)
+                               free(phone_number);
 
                        return;
                }
@@ -2009,7 +2043,11 @@ void message_adaptor_method_call(GDBusConnection *connection,
                                }
                        }
                        free(phone_number);
+                       phone_number = NULL;
                }
+               if (NULL != phone_number)
+                       free(phone_number);
+
                if ((NULL != chat_ids) && (0U < chat_ids_len)) {
                        for (int ci = 0; ci < chat_ids_len; ci++) {
                                if (NULL != chat_ids[ci]) {
@@ -2018,14 +2056,16 @@ void message_adaptor_method_call(GDBusConnection *connection,
                                }
                        }
                        free(chat_ids);
+                       chat_ids = NULL;
                }
+               if (NULL != chat_ids)
+                       free(chat_ids);
        } else if (0 == g_strcmp0(method_name, PRIVATE_DBUS_GET_MSISDN_LIST_METHOD)) {
                char *service_name = NULL;
                int64_t *chat_ids = NULL;
                unsigned int chat_ids_len = 0;
                message_adaptor_chat_id_s **msisdns = NULL;
                unsigned int msisdns_len = 0;
-               void *user_data = NULL;
                void *server_data = NULL;
                message_adaptor_error_code_t *error_code = NULL;
                message_adaptor_error_code_t _error;
@@ -2197,6 +2237,7 @@ GVariant *__create_create_chatroom_res_type(int64_t request_id,
        g_variant_builder_unref(builder_disabled);
        g_variant_builder_unref(builder_existing);
        g_variant_builder_unref(builder_did_violation_users);
+       g_variant_builder_unref(builder_invitation);
 
        return response;
 }
@@ -2484,6 +2525,7 @@ GVariant *__create_invite_chat_res_type(int64_t request_id,
        g_variant_builder_unref(builder_disabled);
        g_variant_builder_unref(builder_existing);
        g_variant_builder_unref(builder_did_violation_users);
+       g_variant_builder_unref(builder_invitation);
 
        return response;
 }
index 3b9e5d109e57d1405042c14f312a01ebaef70f38..2552c1ddeedca900268e1d46b00538b92506282f 100644 (file)
@@ -98,6 +98,7 @@ void push_adaptor_method_call(GDBusConnection *connection,
 
                free(err);
                free(service_file_name);
+               g_variant_unref(in_parameters);
                service_adaptor_debug("[End] Push deregister");
        }
 /*
index 0ad42b6d548dc71c7f7605403ec98d9033f78f58..c3b00d443c46efb928b7d9be276be4ce1bfb478e 100644 (file)
@@ -207,7 +207,6 @@ void shop_adaptor_method_call(GDBusConnection *connection,
                shop_adaptor_shop_info_s info;
                shop_adaptor_shop_item_s **items = NULL;
                unsigned int items_len = 0;
-               void *user_data = NULL;
                void *server_data = NULL;
                shop_adaptor_error_code_t *error_code = NULL;
                shop_adaptor_error_code_t _error;
index 4d7ccff4d64963457aca7db4fb3d20b7c4e52bef..d28cb78d12e84843a81808d1d96b189dd7c5206c 100644 (file)
@@ -118,6 +118,7 @@ void __get_file_transfer_req_type(GVariant *parameters,
        for (size_t j = 0; j < service_adaptor_file_transfer_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 void __get_download_thumbnail_req_type(GVariant *parameters,
@@ -142,6 +143,7 @@ void __get_download_thumbnail_req_type(GVariant *parameters,
        for (size_t j = 0; j < service_adaptor_download_thumbnail_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 /* private feature */
@@ -219,6 +221,7 @@ void __private_get_file_status_req_type(GVariant *parameters,
        for (size_t j = 0; j < private_service_adaptor_file_status_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 GVariant *__private_create_file_status_res_type(int64_t progress_size,
@@ -262,6 +265,7 @@ void __private_get_privilege_check_req_type(GVariant *parameters,
        for (size_t j = 0; j < private_service_adaptor_privilege_check_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 /* public feature */
@@ -281,6 +285,7 @@ void __get_get_root_folder_path_req_type(GVariant *parameters,
        for (size_t j = 0; j < service_adaptor_get_root_folder_path_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 void __get_make_directory_req_type(GVariant *parameters,
@@ -301,6 +306,7 @@ void __get_make_directory_req_type(GVariant *parameters,
        for (size_t j = 0; j < service_adaptor_make_directory_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 void __get_remove_file_req_type(GVariant *parameters,
@@ -321,6 +327,7 @@ void __get_remove_file_req_type(GVariant *parameters,
        for (size_t j = 0; j < service_adaptor_remove_file_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 void __get_remove_directory_req_type(GVariant *parameters,
@@ -341,6 +348,7 @@ void __get_remove_directory_req_type(GVariant *parameters,
        for (size_t j = 0; j < service_adaptor_remove_directory_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 void __get_move_file_req_type(GVariant *parameters,
@@ -363,6 +371,7 @@ void __get_move_file_req_type(GVariant *parameters,
        for (size_t j = 0; j < service_adaptor_move_file_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 void __get_move_directory_req_type(GVariant *parameters,
@@ -385,6 +394,7 @@ void __get_move_directory_req_type(GVariant *parameters,
        for (size_t j = 0; j < service_adaptor_move_directory_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 void __get_get_file_list_req_type(GVariant *parameters,
@@ -405,6 +415,7 @@ void __get_get_file_list_req_type(GVariant *parameters,
        for (size_t j = 0; j < service_adaptor_get_file_list_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 void __get_open_upload_file_req_type(GVariant *parameters,
@@ -427,6 +438,7 @@ void __get_open_upload_file_req_type(GVariant *parameters,
        for (size_t j = 0; j < service_adaptor_open_upload_file_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 void __get_open_download_file_req_type(GVariant *parameters,
@@ -449,6 +461,7 @@ void __get_open_download_file_req_type(GVariant *parameters,
        for (size_t j = 0; j < service_adaptor_open_download_file_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 void __get_open_download_thumbnail_req_type(GVariant *parameters,
@@ -473,6 +486,7 @@ void __get_open_download_thumbnail_req_type(GVariant *parameters,
        for (size_t j = 0; j < service_adaptor_open_download_thumbnail_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 void __get_close_file_req_type(GVariant *parameters,
@@ -506,6 +520,7 @@ void __get_close_file_req_type(GVariant *parameters,
        for (size_t j = 0; j < service_adaptor_close_file_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 void __get_start_upload_file_req_type(GVariant *parameters,
@@ -545,6 +560,7 @@ void __get_start_upload_file_req_type(GVariant *parameters,
        for (size_t j = 0; j < service_adaptor_start_upload_file_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 
@@ -585,6 +601,7 @@ void __get_start_download_file_req_type(GVariant *parameters,
        for (size_t j = 0; j < service_adaptor_start_download_file_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 
@@ -627,6 +644,7 @@ void __get_start_download_thumbnail_req_type(GVariant *parameters,
        for (size_t j = 0; j < service_adaptor_start_download_thumbnail_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 void __get_cancel_file_task_req_type(GVariant *parameters,
@@ -660,6 +678,7 @@ void __get_cancel_file_task_req_type(GVariant *parameters,
        for (size_t j = 0; j < service_adaptor_cancel_file_task_req_s_type_length; j++) {
                g_variant_unref(req_struct[j]);
        }
+       g_variant_unref(in_parameters);
 }
 
 GVariant *__create_file_descriptor_res_type(long long int file_uid,
@@ -1598,7 +1617,7 @@ void storage_adaptor_method_call(GDBusConnection *connection,
                                storage_adaptor_destroy_error_code(&error_code);
 
                                service_adaptor_debug("Re-try API");
-                               ret_code = storage_adaptor_get_transfer_state(plugin, service->storage_context,
+                               storage_adaptor_get_transfer_state(plugin, service->storage_context,
                                                (void *) fd, NULL, &state, &error_code, NULL);
                        }
                        ret_code = storage_adaptor_get_transfer_progress(plugin, service->storage_context,
index 6289c68477b62aefde11bd15bd1513225c484944..c5d5cc4aae560d48c740f326a81feeaad476f83d 100644 (file)
@@ -1310,7 +1310,7 @@ int main(int argc, char *argv[])
        g_main_loop_unref(loop);
 
        service_adaptor_h service_adaptor = service_adaptor_get_handle();
-       service_adaptor_deinit(service_adaptor);
+       service_adaptor_deinit();
 
        return ret;
 }