diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2008-09-25 19:53:36 -0700 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2008-09-25 19:53:36 -0700 |
commit | aaf0f75d2a18a86bca3c418ddd63e936627c4446 (patch) | |
tree | 2bd994990ef263ea49761355a1dcaf7bbbf03532 /src | |
parent | 981f4416220e01a3eab92aa3c8d03c16dcad450d (diff) |
Fix another memory leak
Diffstat (limited to 'src')
-rw-r--r-- | src/device.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/device.c b/src/device.c index c998eb09..82a90e05 100644 --- a/src/device.c +++ b/src/device.c @@ -880,8 +880,10 @@ static void update_services(struct browse_req *req, sdp_list_t *recs) /* Extract the first element and skip the remainning */ uuid_str = bt_uuid2string(svcclass->data); - if (!uuid_str) + if (!uuid_str) { + sdp_list_free(svcclass, free); continue; + } if (!strcasecmp(uuid_str, PNP_UUID)) { uint16_t source, vendor, product, version; @@ -917,6 +919,7 @@ static void update_services(struct browse_req *req, sdp_list_t *recs) /* Check for duplicates */ if (sdp_list_find(req->records, rec, rec_cmp)) { g_free(uuid_str); + sdp_list_free(svcclass, free); continue; } |