[vlc-devel] commit: Fix potential memleak. ( Rémi Duraffort )

Rémi Duraffort ivoire at videolan.org
Sun Jun 21 14:15:24 CEST 2009


Hi,

>  modules/access/dshow/dshow.cpp |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
> 
> diff --git a/modules/access/dshow/dshow.cpp b/modules/access/dshow/dshow.cpp
> index 7d53358..3fbd317 100644
> --- a/modules/access/dshow/dshow.cpp
> +++ b/modules/access/dshow/dshow.cpp
> @@ -2012,7 +2012,11 @@ static int ConfigDevicesCallback( vlc_object_t *p_this, char const *psz_name,
>  
>      p_item = config_FindConfig( p_this, psz_name );
>  
> -    if( !p_item ) return VLC_SUCCESS;
> +    if( !p_item )
> +    {
> +        free( psz_device );
> +        return VLC_SUCCESS;
> +    }
>  
>      if( !strcmp( psz_name, "dshow-adev" ) ) b_audio = true;

I found really suspicious that in some path we have a CoUninitialize()
before returning from the function and that in some other path the
CoUninitialize() isn't present.

Is there some dshow guys who can comment about it ?


-- 
Rémi Duraffort | ivoire



More information about the vlc-devel mailing list