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 potential memory leak on error in LoadCRL() #8415

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

Conversation

nielsdos
Copy link

@nielsdos nielsdos commented Feb 3, 2025

Description

If ProcessFile() fails, the code does not clean up readCtx. Perform the same cleanup as after the loop to fix this.

Note: this was found by an experimental static analyser I'm developing, so it's possible that I'm missing some details as I'm not very familiar with the code.

Testing

It appears that this if condition is not hit when running make test, unless I miss something. So I didn't know how to test this.

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

If ProcessFile() fails, the code does not clean up readCtx.
Perform the same cleanup as after the loop to fix this.
@wolfSSL-Bot
Copy link

Can one of the admins verify this patch?

@embhorn
Copy link
Member

embhorn commented Feb 3, 2025

Hi @nielsdos

Please let us know the details requested from your previous PR #8414

@embhorn embhorn self-assigned this Feb 3, 2025
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