Fix a svace issue 18/97318/1 accepted/tizen/3.0/common/20161116.143107 accepted/tizen/3.0/ivi/20161116.020939 accepted/tizen/3.0/mobile/20161116.020845 accepted/tizen/3.0/tv/20161116.020909 accepted/tizen/3.0/wearable/20161116.020920 submit/tizen_3.0/20161115.010647
authorDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 14 Nov 2016 01:20:02 +0000 (10:20 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 14 Nov 2016 01:20:02 +0000 (10:20 +0900)
Change-Id: I2ac95d446e36bcb0645271cd03c7a8c7026871a0
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
bt-service/bt-service-proximity.c

index 8002671..ad1cf28 100644 (file)
@@ -101,7 +101,12 @@ int bt_set_proximity_property(bluetooth_device_address_t *device_address,
                                                        device_path, BT_PROPERTIES_INTERFACE,  NULL, NULL);
 
        g_free(device_path);
-       retv_if(proxy == NULL, BLUETOOTH_ERROR_INTERNAL);
+
+       if (proxy == NULL) {
+               g_free(property_str);
+               g_free(value_str);
+               return BLUETOOTH_ERROR_INTERNAL;
+       }
 
        ret = g_dbus_proxy_call_sync(proxy, "Set",
                                g_variant_new("(ssv)", BT_PROXIMITY_MONITOR_INTERFACE,  property_str, g_variant_new("s", value_str)),