[vlc-devel] [PATCH] V4L2: Allow device to be specified with option.

Rémi Denis-Courmont remi at remlab.net
Wed Apr 20 11:05:50 CEST 2011


   Hello,

On Wednesday 20 April 2011, Thierry Reding wrote:
> Nothing that hasn't been there before. Although looking at it more closely,
> p_sys->psz_device is free()'d in CommonClose(), so that is not a leak.
> However it seems like an additional strdup() is required after the call to
> var_CreateGetNonEmptyString(), otherwise the variable's value will be
> free()'d twice. Then again I haven't seen any crashes.
> 
> Am I overlooking something?

If I understand the code, previously, p_sys->psz_device would always be NULL 
at that point.  Now, you seem to override a possibly non-NULL pointer with 
another one. Then the original pointer is leaked ??

-- 
Rémi Denis-Courmont
http://www.remlab.info



More information about the vlc-devel mailing list