Fix the instance id's miss-matching issue
[platform/core/connectivity/bluetooth-frwk.git] / bt-api / bt-network.c
index 88af272..43453cd 100644 (file)
@@ -22,7 +22,7 @@
 #include "bt-request-sender.h"
 #include "bt-event-handler.h"
 
-#ifdef TIZEN_DPM_ENABLE
+#ifdef TIZEN_FEATURE_BT_DPM
 #include "bt-dpm.h"
 #endif
 
@@ -76,7 +76,7 @@ BT_EXPORT_API int bluetooth_network_connect(const bluetooth_device_address_t *de
                return BLUETOOTH_ERROR_PERMISSION_DEINED;
        }
 
-#ifdef TIZEN_DPM_ENABLE
+#ifdef TIZEN_FEATURE_BT_DPM
        char *uuid = NULL;
        if (_bt_check_dpm(BT_DPM_ADDRESS, (void *)device_address) == BT_DPM_RESTRICTED) {
                BT_ERR("Blacklist device");
@@ -112,6 +112,7 @@ BT_EXPORT_API int bluetooth_network_connect(const bluetooth_device_address_t *de
 
                if (dev_class.major_class == BLUETOOTH_DEVICE_MAJOR_CLASS_COMPUTER) {
                        BT_ERR("Reject a authorization due to MDM Policy");
+                       g_free(uuid);
                        return BLUETOOTH_ERROR_DEVICE_POLICY_RESTRICTION;
                }
        }