Fix bt-service crash issue in testhub
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / bt-service-hid.c
index 2587a15..28e47f7 100644 (file)
@@ -188,8 +188,6 @@ int _bt_hid_connect(int request_id,
 
        if (ret != BLUETOOTH_ERROR_NONE) {
                BT_ERR("_bt_connect_profile Error");
-               g_free(func_data->address);
-               g_free(func_data);
                return ret;
        }
        return BLUETOOTH_ERROR_NONE;
@@ -225,8 +223,6 @@ int _bt_hid_disconnect(int request_id,
 
        if (ret != BLUETOOTH_ERROR_NONE) {
                BT_ERR("_bt_disconnect_profile Error");
-               g_free(func_data->address);
-               g_free(func_data);
                return ret;
        }
 
@@ -235,11 +231,10 @@ int _bt_hid_disconnect(int request_id,
 
 int _bt_hid_enable_barcode_feature(void)
 {
-       if (vconf_set_bool(BT_HID_BARCODE_SUPPORT, true) != 0) {
+       if (vconf_set_int(BT_HID_BARCODE_SUPPORT, 1) != 0) {
                BT_ERR("Set vconf failed\n");
                return BLUETOOTH_ERROR_INTERNAL;
        }
 
        return BLUETOOTH_ERROR_NONE;
 }
-