On 23/10/14 13:54, [email protected] (Niels Möller) wrote:
> Luca Barbato <[email protected]> writes:
> 
>>      av_opt_free(s);
>>      if (s->iformat && s->iformat->priv_class && s->priv_data)
>>          av_opt_free(s->priv_data);
> 
> Does av_opt_free(s) deallocate s? If so, the above is a blatant use
> after free (which valgrind ought to complain about, if the code is ever
> executed). Moving first av_opt_free last seems like the right thing to
> do.
> 
> Regards,
> /Niels
> 

av_opt_free just frees the options bound to that specific AVClass.

lu
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to