From: Chengyi <zhaochengyi@xxxxxxxxxxxxx> When send_request returns an error, session->discover should be released here, so that the next time the program enters avdtp_discover, the -EBUSY error will not be returned. --- profiles/audio/avdtp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/profiles/audio/avdtp.c b/profiles/audio/avdtp.c index bc7afad81..0d2213ea2 100644 --- a/profiles/audio/avdtp.c +++ b/profiles/audio/avdtp.c @@ -3429,6 +3429,9 @@ int avdtp_discover(struct avdtp *session, avdtp_discover_cb_t cb, if (err == 0) { session->discover->cb = cb; session->discover->user_data = user_data; + } else if (session->discover) { + g_free(session->discover); + session->discover = NULL; } return err; -- 2.20.1