summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hcid/dbus-hci.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/hcid/dbus-hci.c b/hcid/dbus-hci.c
index 8b006077..51f3ca65 100644
--- a/hcid/dbus-hci.c
+++ b/hcid/dbus-hci.c
@@ -1405,9 +1405,12 @@ void hcid_dbus_inquiry_result(bdaddr_t *local, bdaddr_t *peer, uint32_t class,
/* Out of range list update */
l = slist_find(adapter->oor_devices, peer_addr,
(cmp_func_t) strcmp);
- if (l)
+ if (l) {
+ char *dev = l->data;
adapter->oor_devices = slist_remove(adapter->oor_devices,
- l->data);
+ dev);
+ free(dev);
+ }
}
/* send the device found signal */