cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: GnuTLS mem leak in gtls_connect_step3 (test300, torture test)

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 6 Jan 2011 00:48:46 +0100 (CET)

On Wed, 5 Jan 2011, Quinn Slack wrote:

> This prevents my GnuTLS TLS-SRP patch from passing its tests, so I'll try to
> figure this one out. I tried a bit to fix it, but the obvious fix (freeing
> connect_sessionid if the Curl_ssl_addsessionid call in gtls.c:704 fails)
> causes a segfault that only occurs when *not* running in gdb. I'll keep
> trying, but any help would be appreciated.

I think it would be to free() the data in the wrong place since it isn't the
function that allocates it. I would rather suggest a fix like my attachment
shows, although I haven't actually tested it so I'll appreciate feedback!

-- 
  / daniel.haxx.se


-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2011-01-06