diff --git a/profiles/network/manager.c b/profiles/network/manager.c
index ad52885..8d0dc4d 100644
--- a/profiles/network/manager.c
+++ b/profiles/network/manager.c
static gboolean conf_security = TRUE;
struct connect_req {
- struct btd_device *device;
struct btd_profile *profile;
btd_profile_cb cb;
};
{
struct connect_req *req = data;
- req->cb(req->profile, req->device, err);
-
- btd_device_unref(req->device);
+ req->cb(req->profile, device, err);
g_free(req);
}
DBG("path %s id %u", device_get_path(dev), id);
req = g_new0(struct connect_req, 1);
- req->device = btd_device_ref(dev);
req->profile = profile;
req->cb = cb;
err = connection_connect(dev, BNEP_SVC_PANU, NULL, connect_profile_cb,
req);
if (err < 0) {
- btd_device_unref(req->device);
g_free(req);
return err;
}