[PATCH] devenum: Fix a memory leak (Valgrind).

Sven Baars sven.wine at gmail.com
Mon Dec 17 14:59:05 CST 2018


On 17-12-18 21:48, Zebediah Figura wrote:
> On 12/17/2018 02:27 PM, Sven Baars wrote:
>> Signed-off-by: Sven Baars <sven.wine at gmail.com>
>> ---
>>   dlls/devenum/mediacatenum.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/dlls/devenum/mediacatenum.c b/dlls/devenum/mediacatenum.c
>> index 5fa2f008dc..d8541edb3c 100644
>> --- a/dlls/devenum/mediacatenum.c
>> +++ b/dlls/devenum/mediacatenum.c
>> @@ -887,6 +887,8 @@ static HRESULT WINAPI
>> DEVENUM_IEnumMoniker_Next(IEnumMoniker *iface, ULONG celt,
>>                 StringFromGUID2(&clsid, buffer, CHARS_IN_GUID);
>>               StringFromGUID2(&This->class, buffer + CHARS_IN_GUID -
>> 1, CHARS_IN_GUID);
>> +
>> +            CoTaskMemFree(name);
>>           }
>>           /* try DirectShow filters */
>>           else if (!(res = RegEnumKeyW(This->sw_key, This->sw_index,
>> buffer, ARRAY_SIZE(buffer))))
>>
>
> It looks like msdmo shouldn't actually require this parameter; so I
> think it'd be better to fix msdmo and then just pass NULL here.
>
Ah, I see. I assumed it was intended that it returns E_POINTER, but
tests indicate that it shouldn't do that. I guess that would have to
wait until after the freeze, right?




More information about the wine-devel mailing list