On Mon, Apr 20, 2015 at 02:38:47PM +0200, Michael Niedermayer wrote: > 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
also please send a patch to fix the { } placement as nicolas suggested Thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Let us carefully observe those good qualities wherein our enemies excel us and endeavor to excel them, by avoiding what is faulty, and imitating what is excellent in them. -- Plutarch
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel