[PATCH] mshtml/tests: Free ready state BSTR (Valgrind)

Nikolay Sivov bunglehead at gmail.com
Thu Mar 23 04:10:57 CDT 2017


On 23.03.2017 6:07, Daniel Lehman wrote:
> 1 loop of xmlview tests:
> ==2633== 32 bytes in 1 blocks are definitely lost in loss record 624 of 2,647
> ==2633==    at 0x7BC516E5: RtlAllocateHeap (heap.c:254)
> ==2633==    by 0x5123CAA: IMalloc_fnAlloc (ifs.c:187)
> ==2633==    by 0x512416C: IMalloc_Alloc (objidl.h:1508)
> ==2633==    by 0x512416C: CoTaskMemAlloc (???:0)
> ==2633==    by 0x4DC843E: alloc_bstr (oleaut.c:177)
> ==2633==    by 0x4DC89C8: SysAllocStringLen (oleaut.c:355)
> ==2633==    by 0x4DC8AC6: SysAllocString (oleaut.c:247)
> ==2633==    by 0x77B4DE8: get_readystate_string (htmlelem.c:248)
> ==2633==    by 0x779A522: HTMLDocument_get_readyState (htmldoc.c:641)
> ==2633==    by 0x4C6B064: HTMLEvents_Invoke (mshtml.h:56005)
> ==2633==    by 0x77BC74A: call_event_handlers (oaidl.h:887)
> ==2633==    by 0x77BCC70: fire_event_obj.isra.6 (htmlevent.c:1134)
> ==2633==    by 0x783CE76: notif_readystate (persist.c:451)
> ==2633==    by 0x7823B30: handle_load (nsevents.c:253)
> ==2633==    by 0x6B18A8A8: ???
> 
> 3 loops of xmlview tests:
> ==23851== 96 bytes in 3 blocks are definitely lost in loss record 1,767 of 2,701
> ==23851==    at 0x7BC516D5: RtlAllocateHeap (heap.c:254)
> ==23851==    by 0x5123CAA: IMalloc_fnAlloc (ifs.c:187)
> ==23851==    by 0x512416C: IMalloc_Alloc (objidl.h:1508)
> ==23851==    by 0x512416C: CoTaskMemAlloc (???:0)
> ==23851==    by 0x4DC843E: alloc_bstr (oleaut.c:177)
> ==23851==    by 0x4DC89C8: SysAllocStringLen (oleaut.c:355)
> ==23851==    by 0x4DC8AC6: SysAllocString (oleaut.c:247)
> ==23851==    by 0x7683DE8: get_readystate_string (htmlelem.c:248)
> ==23851==    by 0x7669522: HTMLDocument_get_readyState (htmldoc.c:641)
> ==23851==    by 0x4C6B314: HTMLEvents_Invoke (mshtml.h:56005)
> ==23851==    by 0x768B74A: call_event_handlers (oaidl.h:887)
> ==23851==    by 0x768BC70: fire_event_obj.isra.6 (htmlevent.c:1134)
> ==23851==    by 0x770BE76: notif_readystate (persist.c:451)
> ==23851==    by 0x76F2B30: handle_load (nsevents.c:253)
> ==23851==    by 0x6B18A8A8: ???
> 
> Signed-off-by: Daniel Lehman <dlehman25 at gmail.com>
> ---
>  dlls/msxml3/tests/xmlview.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/dlls/msxml3/tests/xmlview.c b/dlls/msxml3/tests/xmlview.c
> index 3c1d8d9..dc8ab7d 100644
> --- a/dlls/msxml3/tests/xmlview.c
> +++ b/dlls/msxml3/tests/xmlview.c
> @@ -130,6 +130,7 @@ static HRESULT WINAPI HTMLEvents_Invoke(IDispatch *iface, DISPID dispIdMember, R
>          ok(hr == S_OK, "got 0x%08x\n", hr);
>          if(!memcmp(state, completeW, sizeof(completeW)))
>              loaded = TRUE;
> +        SysFreeString(state);
>      }
>  
>      return S_OK;
> 

This obviously looks correct, please resend with subject changed to
msxml3/tests.



More information about the wine-devel mailing list