From 8f498abd339abdb65a6458b82a0d8c029e34f2ef Mon Sep 17 00:00:00 2001 From: Jaganath Kanakkassery Date: Fri, 4 Jan 2013 11:12:27 +0530 Subject: [PATCH] storage: Fix memory leak 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 375974a43..be3bbf25c 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); -- 2.47.3