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

bug fix: Make a new copy when you add a call to current_calls. #54

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

Conversation

more36
Copy link
Contributor

@more36 more36 commented Feb 11, 2025

bug: v/53473

rootcause: Adding the same pointer will cause repeated release.

Summary

Make a new copy when you add a call to current_calls.

bug: v/53473

rootcause: Adding the same pointer will cause repeated release.

Signed-off-by: duqunbo <[email protected]>
@@ -391,7 +391,7 @@ static void query_current_calls_final(hf_state_machine_t* hfsm)
hfp_current_call_t* ccall = bt_list_find(clist, call_index_cmp, &ucall->index);
/* update new call to current call list */
if (!ccall) {
bt_list_add_tail(clist, ucall);
bt_list_add_tail(clist, hf_call_new(ucall->index, ucall->dir, ucall->state, ucall->mpty, ucall->number));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we create a new call rather than moving the existing one?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line feed required.

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.

3 participants