-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LE Audio: le audio memory leak. #27
base: dev
Are you sure you want to change the base?
Conversation
@@ -269,11 +269,15 @@ static void tbs_call_list_query_complete(tapi_async_result* result) | |||
lea_tbs_call_state_t* state_s = malloc(sizeof(lea_tbs_call_state_t) * result->arg2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check NULL first, to avoid free(NULL)
|
||
if (result->arg2 == 0) | ||
if (result->arg2 == 0) { | ||
free(state_s); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lea_tbs_call_state_changed() will not free state_s
better to add "free(state_s)" at the end of this func, add use "goto" to handle fault case
9655bcf
to
17b0add
Compare
bug: v/51552 Signed-off-by: huangyulong3 <[email protected]>
17b0add
to
ba0e6a9
Compare
LE Audio: le audio memory leak.
bug: v/51552
Signed-off-by: huangyulong3 [email protected]