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

Zebediah Figura z.figura12 at gmail.com
Mon Dec 17 15:01:09 CST 2018


On 12/17/2018 02:59 PM, Sven Baars wrote:
> 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?
> 
> 
> 

I don't see it as a potentially breaking change, but I guess it's up to 
Alexandre's judgement. A leak in devenum is hardly urgent anyway ;-)



More information about the wine-devel mailing list