cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Mem leak in curl_ntlm_msg.c

From: Christian Hägele <haegele_at_teamviewer.com>
Date: Mon, 11 Feb 2013 11:08:25 +0100

Am 08.02.2013, 13:55 Uhr, schrieb Gisle Vanem <gvanem_at_broadpark.no>:

>
> 'dup_domain.tbyte_ptr' looks to be freed in Curl_ntlm_sspi_cleanup()
> via 'ntlm->identity.Domain'. But I see no freeing of
> 'dup_domain.tchar_ptr'.
>

I didn't have the opportunity to test the code, but as
dup_domain.tbyte_ptr and dup_domain.tchar_ptr is the same pointer (it's
defined as union xcharp_u not as struct) your explanation seems wrong.
If you free dup_domain.tchar_ptr as you proposed in your patch you also
deleting the memory you just assigned to the ntlm->identity.Domain pointer.
Did I miss something here? Did you test your code with a domainlen larger
than 0?

Regards,

Christian

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-02-11