aboutsummaryrefslogtreecommitdiffstats
path: root/attrib/manager.c
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2010-11-24 00:30:46 -0200
committerJohan Hedberg <johan.hedberg@nokia.com>2010-11-29 19:20:45 +0200
commitdbe7a78109301abaaa319fa88f5bb9d8f79151ce (patch)
treee48aa758c63806c9fac402e9454836d1fc66b4ac /attrib/manager.c
parent43e7a91f82123ec24486550c01bbc101b144f0d0 (diff)
downloadbluez-dbe7a78109301abaaa319fa88f5bb9d8f79151ce.tar.gz
bluez-dbe7a78109301abaaa319fa88f5bb9d8f79151ce.tar.xz
bluez-dbe7a78109301abaaa319fa88f5bb9d8f79151ce.zip
Fix memory leak of sdp list in the attribute client
Diffstat (limited to 'attrib/manager.c')
-rw-r--r--attrib/manager.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/attrib/manager.c b/attrib/manager.c
index 9b06c8ca..f991f8ee 100644
--- a/attrib/manager.c
+++ b/attrib/manager.c
@@ -44,15 +44,19 @@ static DBusConnection *connection;
static int client_probe(struct btd_device *device, GSList *uuids)
{
const sdp_record_t *rec;
- sdp_list_t *list;
int psm = -1;
rec = btd_device_get_record(device, GATT_UUID);
if (rec) {
+ sdp_list_t *list;
if (sdp_get_access_protos(rec, &list) < 0)
return -1;
psm = sdp_get_proto_port(list, L2CAP_UUID);
+
+ sdp_list_foreach(list, (sdp_list_func_t) sdp_list_free, NULL);
+ sdp_list_free(list, NULL);
+
if (psm < 0)
return -1;
}