On Mon, Apr 20, 2015 at 03:03:08AM +0300, Ludmila Glinskih wrote:
> Signed-off-by: Ludmila Glinskih <lglins...@gmail.com>
> ---
>  libavcodec/Makefile        |   1 +
>  libavcodec/api-flac-test.c | 290 
> +++++++++++++++++++++++++++++++++++++++++++++
>  tests/fate/libavcodec.mak  |   6 +
>  3 files changed, 297 insertions(+)
>  create mode 100644 libavcodec/api-flac-test.c
[...]
> +static int close_encoder(AVCodecContext *enc_ctx)
> +{
> +    avcodec_close(enc_ctx);
> +    av_freep(&enc_ctx);
> +    return 0;
> +}
> +
> +static int close_decoder(AVCodecContext *dec_ctx)
> +{
> +    avcodec_close(dec_ctx);
> +    av_freep(&dec_ctx);
> +    return 0;
> +}

the idea of av_freep() is to clear the freed pointer so no stale
pointer is left that could be dereferenced by mistake
fixed that
applied

thanks

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire

Attachment: signature.asc
Description: Digital signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to