[PATCH] windowscodecs/tests: Fix a memory leak (Valgrind).

Dmitry Timoshkov dmitry at baikal.ru
Mon Aug 19 03:49:37 CDT 2019


Sven Baars <sven.wine at gmail.com> wrote:

> >> diff --git a/dlls/windowscodecs/tests/metadata.c b/dlls/windowscodecs/tests/metadata.c
> >> index b434648fe5..a955702c82 100644
> >> --- a/dlls/windowscodecs/tests/metadata.c
> >> +++ b/dlls/windowscodecs/tests/metadata.c
> >> @@ -3029,6 +3029,7 @@ static void test_queryreader(void)
> >>                      ok(hr == E_INVALIDARG, "got %#x\n", hr);
> >>  
> >>                      IWICMetadataQueryReader_Release(new_reader);
> >> +                    PropVariantClear(&value);
> >>                  }
> >>                  else if (value.vt == VT_LPSTR)
> >>                      ok(!lstrcmpA(U(value).pszVal, test_data[i].str_value), "%u: expected %s, got %s\n",
> > 
> > Did you see a comment 7 lines lower? Calling PropVariantClear() for fake
> > types will lead to crashes.
> > 
> Yes, I did. That's why I do not call it for the other types.

Thanks for the clarification. If that works then I don't object to the patch.

-- 
Dmitry.



More information about the wine-devel mailing list