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

Memory allocation in [dev] il2p_payload.c #373

Closed
ghost opened this issue Jan 18, 2022 · 1 comment
Closed

Memory allocation in [dev] il2p_payload.c #373

ghost opened this issue Jan 18, 2022 · 1 comment

Comments

@ghost
Copy link

ghost commented Jan 18, 2022

The allocations can be moved out of the loops.

https://github.com/wb2osz/direwolf/blob/dev/src/il2p_payload.c#L237

https://github.com/wb2osz/direwolf/blob/dev/src/il2p_payload.c#L261

@ghost
Copy link
Author

ghost commented Jan 18, 2022

Another solution, if you want the memory initialized might be:

Do the above and then put in its place:

    memset(corrected_block, 0, 255);

@ghost ghost closed this as completed Jan 27, 2022
This issue was closed.
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

0 participants