If bt_uuid2string() returns NULL then svcclass has to be freed --- src/storage.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/storage.c b/src/storage.c index 375974a..be3bbf2 100644 --- a/src/storage.c +++ b/src/storage.c @@ -180,8 +180,10 @@ sdp_record_t *find_record_in_list(sdp_list_t *recs, const char *uuid) /* Extract the uuid */ uuid_str = bt_uuid2string(svcclass->data); - if (!uuid_str) + if (!uuid_str) { + sdp_list_free(svcclass, free); continue; + } if (!strcasecmp(uuid_str, uuid)) { sdp_list_free(svcclass, free); -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html