diff --git a/src/device.c b/src/device.c
index 6362130..e1219c4 100644
--- a/src/device.c
+++ b/src/device.c
void btd_device_unref(struct btd_device *device)
{
- char *path;
-
device->ref--;
DBG("%p: ref=%d", device, device->ref);
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)