Skip to content

mbedtld: release sessionid resources on error - #3574

Closed
danielgustafsson wants to merge 1 commit into
curl:masterfrom
danielgustafsson:dg-mbedtls_session_free
Closed

danielgustafsson wants to merge 1 commit into
curl:masterfrom
danielgustafsson:dg-mbedtls_session_free

Conversation

@danielgustafsson

Copy link
Copy Markdown
Contributor

If mbedtls_ssl_get_session() fails, it may still have allocated memory that needs to be freed to avoid leaking. Call the library API function to release session resources on this errorpath as well as on Curl_ssl_addsessionid() errors.

Closes: #xxxx
Reported-by: Michał Antoniak M.Antoniak@posnet.com

If mbedtls_ssl_get_session() fails, it may still have allocated
memory that needs to be freed to avoid leaking. Call the library
API function to release session resources on this errorpath as
well as on Curl_ssl_addsessionid() errors.

Closes: #xxxx
Reported-by: Michał Antoniak <M.Antoniak@posnet.com>

@bagder bagder left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These functions are ridiculously badly documented by mbedTLS, but based on existing example code and educated guesses I think this is a step forward.

@jay

jay commented Feb 15, 2019

Copy link
Copy Markdown
Member

s/mbedtld/mbedtls

@lock lock Bot locked as resolved and limited conversation to collaborators May 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants