Diff between a399286dc5bbce931975c3403974da1b02485160 and 8332abd8fe8cfb88aa323b315eb228f0d0f581ff

Changed Files

File Additions Deletions Status
src/device.c +1 -7 modified

Full Patch

diff --git a/src/device.c b/src/device.c
index 6362130..e1219c4 100644
--- a/src/device.c
+++ b/src/device.c
@@ -3990,8 +3990,6 @@ struct btd_device *btd_device_ref(struct btd_device *device)
 
 void btd_device_unref(struct btd_device *device)
 {
-	char *path;
-
 	device->ref--;
 
 	DBG("%p: ref=%d", device, device->ref);
@@ -3999,11 +3997,7 @@ void btd_device_unref(struct btd_device *device)
 	if (device->ref > 0)
 		return;
 
-	path = g_strdup(device->path);
-
-	g_dbus_unregister_interface(dbus_conn, path, DEVICE_INTERFACE);
-
-	g_free(path);
+	g_dbus_unregister_interface(dbus_conn, device->path, DEVICE_INTERFACE);
 }
 
 int device_get_appearance(struct btd_device *device, uint16_t *value)