Skip to content
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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

huangyulong3
Copy link

LE Audio: le audio memory leak.

bug: v/51552

Signed-off-by: huangyulong3 [email protected]

@huangyulong3 huangyulong3 requested a review from hyson710 as a code owner January 3, 2025 14:05
@CLAassistant
Copy link

CLAassistant commented Jan 3, 2025

CLA assistant check
All committers have signed the CLA.

@@ -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);
Copy link
Collaborator

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);
Copy link
Collaborator

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

bug: v/51552

Signed-off-by: huangyulong3 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants