On 4/21/21 7:58 PM, Gijs Vermeulen wrote:
- if(This->doc_host.document &&
SUCCEEDED(IUnknown_QueryInterface(This->doc_host.document, &IID_IHTMLDocument2, (void **)&doc))) {
hres = IHTMLDocument2_get_title(doc, LocationName);
if(hres == S_OK && !SysStringLen(*LocationName))
hres = get_location_url(&This->doc_host, LocationName);
You leak *LocationName when get_title() returns an empty string.
Thanks,
Jacek