diff options
Diffstat (limited to 'hcid/dbus-rfcomm.c')
-rw-r--r-- | hcid/dbus-rfcomm.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/hcid/dbus-rfcomm.c b/hcid/dbus-rfcomm.c index 2aa93be8..d0c28cdb 100644 --- a/hcid/dbus-rfcomm.c +++ b/hcid/dbus-rfcomm.c @@ -613,8 +613,11 @@ static void rfcomm_conn_req_continue(sdp_record_t *rec, void *data, int err) goto failed; } - if (!sdp_get_access_protos(rec, &protos)) + if (!sdp_get_access_protos(rec, &protos)) { ch = sdp_get_proto_port(protos, RFCOMM_UUID); + sdp_list_foreach(protos, (sdp_list_func_t)sdp_list_free, NULL); + sdp_list_free(protos, NULL); + } if (ch == -1) { error_record_does_not_exist(cdata->conn, cdata->msg); goto failed; @@ -851,8 +854,11 @@ static void rfcomm_bind_req_continue(sdp_record_t *rec, void *data, int err) goto failed; } - if (!sdp_get_access_protos(rec, &protos)) + if (!sdp_get_access_protos(rec, &protos)) { ch = sdp_get_proto_port(protos, RFCOMM_UUID); + sdp_list_foreach(protos, (sdp_list_func_t)sdp_list_free, NULL); + sdp_list_free(protos, NULL); + } if (ch == -1) { error_record_does_not_exist(cdata->conn, cdata->msg); goto failed; |