]> granicus.if.org Git - curl/commit
mbedtls: release sessionid resources on error
authorDaniel Gustafsson <daniel@yesql.se>
Sat, 16 Feb 2019 21:30:31 +0000 (22:30 +0100)
committerDaniel Gustafsson <daniel@yesql.se>
Sat, 16 Feb 2019 21:30:31 +0000 (22:30 +0100)
commit0299b262cd9c75adab546f4851c03995d98d61e1
tree2e928de5eddeb5ae4f2757ce868709d8e0458c7b
parent188036ca58e63443f4430e035f5c535dce772e40
mbedtls: release sessionid resources on error

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: #3574
Reported-by: MichaƂ Antoniak <M.Antoniak@posnet.com>
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
lib/vtls/mbedtls.c