Fix the Svace issue
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / bt-service-proximity.c
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,