From 3d9046dd90ce547d24735d83aefdba7389f4513d Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 14 Jan 2015 20:09:22 +0200 Subject: [PATCH] core: Fix missing check for g_slist_find_custom() lookup failure --- src/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/device.c b/src/device.c index 75a598402..1e1356504 100644 --- a/src/device.c +++ b/src/device.c @@ -2766,7 +2766,7 @@ static void gatt_service_removed(struct gatt_db_attribute *attr, */ l = g_slist_find_custom(device->uuids, prim->uuid, bt_uuid_strcmp); - if (!g_slist_find_custom(device->primaries, prim->uuid, + if (l && !g_slist_find_custom(device->primaries, prim->uuid, prim_uuid_cmp)) { g_free(l->data); device->uuids = g_slist_delete_link(device->uuids, l); -- 2.47.3