mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-15 16:24:28 +08:00
avdtp: fix possible minor problems
It should always be considered that if send_request fails, sep should be removed from the list and the requested memory freed;
This commit is contained in:
parent
be7ebf29b3
commit
44658fccac
@ -2765,8 +2765,11 @@ static gboolean avdtp_discover_resp(struct avdtp *session,
|
||||
|
||||
ret = send_request(session, TRUE, NULL, getcap_cmd,
|
||||
&req, sizeof(req));
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
session->seps = g_slist_remove(session->seps, sep);
|
||||
g_free(sep);
|
||||
break;
|
||||
}
|
||||
getcap_pending = TRUE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user