[1/4] urlmon: Use CoTaskMemFree instead of HeapFree for memory allocated with CoTaskMemAlloc

Thomas Mullaly thomas.mullaly at gmail.com
Mon Sep 5 09:21:26 CDT 2011


Hi Jacek,

On Mon, Sep 5, 2011 at 3:33 AM, Jacek Caban <jacek at codeweavers.com> wrote:

> AFAICS secur_url wasn't allocated with CoTaskMemAlloc until this patch. Why
> are you changing it?

map_url_to_zone gets "secur_url" allocated in one of two ways. The
first way is through CoInternetGetSecurityUrl, which allocates the
resulting URL with CoTaskMemAlloc. The second way is if
CoInternetGetSecurityUrl fails, in which case it was allocating with
HeapAlloc. Since we can't change how CoInternetGetSecurityUrl
allocates memory, I switched everything to use the CoTaskMem*
functions, so that we don't mix CoTaskMemAlloc functions with HeapFree
functions.

-- 
Thomas Mullaly
thomas.mullaly at gmail.com



More information about the wine-devel mailing list