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

Fix a memory leak introduced by last commit for high level EVP API #82

Merged
merged 2 commits into from
Mar 19, 2024
Merged

Fix a memory leak introduced by last commit for high level EVP API #82

merged 2 commits into from
Mar 19, 2024

Conversation

wumiaont
Copy link
Contributor

The last commit to use Openssl high level EVP API for CMAC has an issue where the EVP_MAC object created by EVP_MAC_fetch() is not freed.

Added the EVP_MAC_free() to free the fetched object after use.

@lguohan
Copy link
Contributor

lguohan commented Mar 18, 2024

@Pterosaur check?

@wumiaont
Copy link
Contributor Author

@Pterosaur check?

No need to check cmac right? If it's NULL EVP_MAC_free(emac) will do nothing.

Copy link
Collaborator

@xumia xumia left a comment

Choose a reason for hiding this comment

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

LGTM

@xumia xumia requested a review from r12f March 19, 2024 01:25
@xumia
Copy link
Collaborator

xumia commented Mar 19, 2024

@r12f , could you please help approve it? Thanks.

Copy link

@r12f r12f left a comment

Choose a reason for hiding this comment

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

lgtm! Thanks a lot for fixing this!

@xumia xumia merged commit 13e6f11 into sonic-net:master Mar 19, 2024
9 checks passed
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