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

Zebediah Figura z.figura12 at gmail.com
Mon Dec 17 14:48:25 CST 2018


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.



More information about the wine-devel mailing list