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

searchCmd is freed but not cleared #6

Closed
kossnikita opened this issue Nov 2, 2023 · 1 comment · Fixed by #7
Closed

searchCmd is freed but not cleared #6

kossnikita opened this issue Nov 2, 2023 · 1 comment · Fixed by #7

Comments

@kossnikita
Copy link
Contributor

This is where you free memory after allocation. But don't reset the pointer.

atc/atc.c

Line 210 in 18f3560

atc_free(atc->searchCmd[i]);

Freeing does not reset the pointer, so the next time it is called, the check does not work correctly.

atc/atc.c

Line 183 in 18f3560

if (atc->searchCmd[i] != NULL)

This causes the already freed memory to be re-free. In my case this is a hard fault.

@nimaltd
Copy link
Owner

nimaltd commented Nov 4, 2023

Hello. Thanks for your report. Is it possible you solve it. I am working on many projects and I can not solve it now. thanks

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 a pull request may close this issue.

2 participants