Fix the Svace issue 22/97022/1 accepted/tizen/common/20161114.170856 accepted/tizen/ivi/20161114.004850 accepted/tizen/mobile/20161114.004725 accepted/tizen/tv/20161114.004752 accepted/tizen/wearable/20161114.004816 submit/tizen/20161111.041026
authorHyuk Lee <hyuk0512.lee@samsung.com>
Fri, 11 Nov 2016 03:59:34 +0000 (12:59 +0900)
committerHyuk Lee <hyuk0512.lee@samsung.com>
Fri, 11 Nov 2016 04:00:35 +0000 (13:00 +0900)
Change-Id: I092fefa65cf5f95058e9385035e6e02841fbfd25
Signed-off-by: Hyuk Lee <hyuk0512.lee@samsung.com>
bt-service/bt-service-event-sender.c
bt-service/bt-service-pbap.c
bt-service/bt-service-proximity.c
test/bluetooth-frwk-test.c

index 19df7fde113b27daf74956af9961a988b3be60ec..d269e75bb3cc010b0c66c2b00f0a5b4a04cb8c5d 100644 (file)
@@ -423,6 +423,7 @@ int _bt_send_event(int event_type, int event, GVariant *param)
                break;
        case BLUETOOTH_EVENT_REMOTE_IBEACON_DEVICE_FOUND:
                signal = BT_IBEACON_DEVICE_FOUND;
+               break;
        case BLUETOOTH_EVENT_PXP_PROPERTY_CHANGED:
                signal = BT_PXP_PROPERTY_CHANGED;
                break;
index 9cbf00484761b8d764c5e71f7ceb5af7f258d83b..d69b66adae8f2467a5d2f34db0e36972d71a06f3 100644 (file)
@@ -1151,6 +1151,8 @@ int _bt_pbap_get_phonebook_size(const bluetooth_device_address_t *address,
        g_conn = _bt_gdbus_get_session_gconn();
        if (g_conn == NULL) {
                BT_ERR("Couldn't connect to session bus");
+               g_free(source_string);
+               g_free(type_string);
                return 0;
        }
        g_pbap_session_proxy =  g_dbus_proxy_new_sync(g_conn,
@@ -1238,6 +1240,8 @@ int _bt_pbap_get_phonebook(const bluetooth_device_address_t *address,
        g_conn = _bt_gdbus_get_session_gconn();
        if (g_conn == NULL) {
                BT_ERR("Couldn't connect to session bus");
+               g_free(source_string);
+               g_free(type_string);
                return 0;
        }
        g_pbap_session_proxy =  g_dbus_proxy_new_sync(g_conn,
@@ -1324,6 +1328,8 @@ int _bt_pbap_get_list(const bluetooth_device_address_t *address, int source,
        g_conn = _bt_gdbus_get_session_gconn();
        if (g_conn == NULL) {
                BT_ERR("Couldn't connect to session bus");
+               g_free(source_string);
+               g_free(type_string);
                return 0;
        }
        g_pbap_session_proxy =  g_dbus_proxy_new_sync(g_conn,
@@ -1411,6 +1417,8 @@ int _bt_pbap_pull_vcard(const bluetooth_device_address_t *address,
        g_conn = _bt_gdbus_get_session_gconn();
        if (g_conn == NULL) {
                BT_ERR("Couldn't connect to session bus");
+               g_free(source_string);
+               g_free(type_string);
                return 0;
        }
        g_pbap_session_proxy =  g_dbus_proxy_new_sync(g_conn,
@@ -1496,6 +1504,8 @@ int _bt_pbap_phonebook_search(const bluetooth_device_address_t *address,
        g_conn = _bt_gdbus_get_session_gconn();
        if (g_conn == NULL) {
                BT_ERR("Couldn't connect to session bus");
+               g_free(source_string);
+               g_free(type_string);
                return 0;
        }
        g_pbap_session_proxy =  g_dbus_proxy_new_sync(g_conn,
index 6ed4b6bb1c6e309edc283d72050de4ef6c91743e..957bd6f319700b27991113b4fc74c23fdb313b09 100644 (file)
@@ -93,8 +93,11 @@ int bt_set_proximity_property(bluetooth_device_address_t *device_address,
        value_str = _bt_convert_alert_level_to_string(alert_level);
        property_str =_bt_convert_property_to_string(property);
 
-       if (value_str == NULL || property_str == NULL)
+       if (value_str == NULL || property_str == NULL) {
+               g_free(property_str);
+               g_free(value_str);
                return BLUETOOTH_ERROR_INTERNAL;
+       }
 
        proxy = g_dbus_proxy_new_sync(conn, G_DBUS_PROXY_FLAGS_NONE,
                                                        NULL, BT_BLUEZ_NAME,
index 7636eea2b69d7525a1b243fad0f7a77cf7ea9965..643679b75f176815afc9f56f8574256015a5c70a 100644 (file)
@@ -1399,8 +1399,8 @@ void bt_event_callback(int event, bluetooth_event_param_t* param, void *user_dat
                        tc_result(TC_FAIL, 15);
                        TC_PRT("*****API failed ***** ");
                }
-               break;
 #endif
+               break;
        }
 
        case BLUETOOTH_EVENT_SERVICE_SEARCHED: