return TRUE;
}
-
static GDBusProxy *profile_gproxy;
static int latest_id = -1;
#define BT_RFCOMM_ID_MAX 245
DBUS_TIMEOUT, NULL,
(GAsyncReadyCallback)cb,
func_data);
+ if (cb == NULL)
+ g_object_unref(proxy);
BT_DBG("-");
return BLUETOOTH_ERROR_NONE;
}
DBUS_TIMEOUT, NULL,
(GAsyncReadyCallback)cb,
func_data);
+ if (cb == NULL)
+ g_object_unref(proxy);
BT_DBG("-");
return BLUETOOTH_ERROR_NONE;
}
DBUS_TIMEOUT, NULL,
(GAsyncReadyCallback)cb,
func_data);
+ if (cb == NULL)
+ g_object_unref(proxy);
BT_DBG("-");
return BLUETOOTH_ERROR_NONE;
}
g_variant_new("(o)", path),
G_DBUS_CALL_FLAGS_NONE,
DBUS_TIMEOUT, NULL, NULL, NULL);
+ g_object_unref(proxy);
BT_DBG("-");
return BLUETOOTH_ERROR_NONE;
}
{
int ret;
-
ret = _bt_deinit_event_handler();
if (ret != BLUETOOTH_ERROR_NONE)
BT_ERR("Fail to deinit the event handler");
_bt_gdbus_deinit_proxys();
+ if (profile_gproxy) {
+ g_object_unref(profile_gproxy);
+ profile_gproxy = NULL;
+ }
+
if (system_private_conn) {
g_object_unref(system_private_conn);
system_private_conn = NULL;