summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-hci.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2006-12-18 12:58:35 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2006-12-18 12:58:35 +0000
commit020112444a9b840e37bfcb5c65dd0b45b147e7fc (patch)
tree3dd542e138a0b2cdc6aa8cd15c55c8699ce3a122 /hcid/dbus-hci.c
parentc5809179683c8fd513b339b2eff6f70df952496b (diff)
Plug memory leak in OOR device list
Diffstat (limited to 'hcid/dbus-hci.c')
-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 */