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

there is memory leak in ptr_doa->m_doa_fid #39

Open
bbyuan3 opened this issue Aug 30, 2021 · 0 comments
Open

there is memory leak in ptr_doa->m_doa_fid #39

bbyuan3 opened this issue Aug 30, 2021 · 0 comments

Comments

@bbyuan3
Copy link

bbyuan3 commented Aug 30, 2021

in file
/kernels/dios_ssp_doa/dios_ssp_doa_api.c
line 125, ptr_doa->m_doa_fid = (int*)calloc(ptr_doa->m_angle_num, sizeof(int));

you only alloc ptr_doa->m_angle_num ,but when you use it

line 169- > Line 172
for(i = 0; i < ptr_doa->m_frq_bin_num; ++i)
{
ptr_doa->m_doa_fid[i] = ptr_doa->m_low_fid + (iptr_doa->m_frq_spptr_doa->m_fft_size)/ptr_doa->m_fs;
}

when tr_doa->m_frq_bin_num larger than ptr_doa->m_angle_num
there could be a memory leak risk occurs

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

No branches or pull requests

1 participant