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

BIO memory leak with pkey_from_pem and x509__x509_from_string? #45

Open
raybondo opened this issue Aug 12, 2016 · 4 comments
Open

BIO memory leak with pkey_from_pem and x509__x509_from_string? #45

raybondo opened this issue Aug 12, 2016 · 4 comments

Comments

@raybondo
Copy link

raybondo commented Aug 12, 2016

It looks like pkey_from_pem and x509__x509_from_string don't BIO_free their memory object when they succeed, only when they fail. Would this result in a memory leak? Or do the pkey and x509 cert objects retain a reference to the allocated memory and free it when they are freed?

@palmerabollo
Copy link

palmerabollo commented Oct 30, 2017

@raybondo did you find any fix or workaround for this issue?
There is a fix #43 , it would be great to merge it.

@raybondo
Copy link
Author

Ah, thanks. I had added the BIO_free(mem); call to the two functions in our codebase. The fix #43 is identical to our internal change for x509__x509_from_string.

The pkey_from_pem leak still exists in the github version.

@palmerabollo
Copy link

Thanks for your quick answer. What do you mean by "our codebase"? Do you have a fork where the issue is fixed? I'd be happy to use it if possible.

@raybondo
Copy link
Author

raybondo commented Oct 30, 2017 via email

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

2 participants