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 19df7fd..d269e75 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 9cbf004..d69b66a 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 6ed4b6b..957bd6f 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 7636eea..643679b 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: