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

Sven Baars sven.wine at gmail.com
Mon Aug 19 03:37:42 CDT 2019


On 19-08-19 04:51, Dmitry Timoshkov wrote:
> 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.



More information about the wine-devel mailing list