cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Memory leak in a libcurl with mbedtls

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 18 Mar 2016 22:22:40 +0100 (CET)

On Fri, 18 Mar 2016, Mindaugas Jaraminas wrote:

> Here full libs with debugging symbols

Did you check if Curl_mbedtls_close() is called properly?

Can you figure out why the lines

   mbedtls_pk_free(&conn->ssl[sockindex].pk);
   mbedtls_x509_crt_free(&conn->ssl[sockindex].clicert);

aren't enough to free this data?

I failed to reproduce this leak (using libcurl from git and mbedTLS/2.2.1),
which I guess is because I don't have any HTTPS sites that actually wants/uses
client certificates:

$ valgrind ./src/curl https://example.com/ --cert test_cert.pem --key
test_key.pem

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html
Received on 2016-03-18