diff options
-rw-r--r-- | src/device.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/device.c b/src/device.c index b7c17bb8..f8c5a3fd 100644 --- a/src/device.c +++ b/src/device.c @@ -1166,9 +1166,6 @@ int device_browse(struct btd_device *device, DBusConnection *conn, req->conn = conn ? dbus_connection_ref(conn) : get_dbus_connection(); - if (msg) - req->msg = dbus_message_ref(msg); - req->device = device; if (search) { @@ -1183,6 +1180,7 @@ int device_browse(struct btd_device *device, DBusConnection *conn, device->discov_active = 1; if (msg) { + req->msg = dbus_message_ref(msg); device->discov_requestor = g_strdup(dbus_message_get_sender(msg)); /* Track the request owner to cancel it * automatically if the owner exits */ |