[FFmpeg-devel] [CRASH]

Etienne Buira etienne.buira.lists at free.fr
Tue Jun 7 23:46:31 CEST 2011


On Tue, Jun 07, 2011 at 11:25:19PM +0200, Stefano Sabatini wrote:
> On date Tuesday 2011-06-07 23:08:29 +0200, Etienne Buira encoded:
> > diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
> > index cf0eb43..8be0192 100644
> > --- a/libavfilter/vf_drawtext.c
> > +++ b/libavfilter/vf_drawtext.c
> > @@ -349,13 +349,6 @@ static av_cold void uninit(AVFilterContext *ctx)
> >      DrawTextContext *dtext = ctx->priv;
> >      int i;
> >  
> > -    av_freep(&dtext->fontfile);
> > -    av_freep(&dtext->text);
> > -    av_freep(&dtext->expanded_text);
> > -    av_freep(&dtext->fontcolor_string);
> > -    av_freep(&dtext->boxcolor_string);
> > -    av_freep(&dtext->positions);
> > -    av_freep(&dtext->shadowcolor_string);
> >      av_tree_enumerate(dtext->glyphs, NULL, NULL, glyph_enu_free);
> >      av_tree_destroy(dtext->glyphs);
> >      dtext->glyphs = 0;
> 
> Uh, why this? As far as I know av_opt_free() is not (yet?) used in
> libavfilter.

Sorry, didn't check actually, I assumed it was used whenever AVOption
were used.

Attached the only (corrected) interesting part.

-------------- next part --------------
diff --git a/libavformat/crypto.c b/libavformat/crypto.c
index 789a4d1..03bfedd 100644
--- a/libavformat/crypto.c
+++ b/libavformat/crypto.c
@@ -97,8 +97,8 @@ static int crypto_open(URLContext *h, const char *uri, int flags)
 
     return 0;
 err:
-    av_free(c->key);
-    av_free(c->iv);
+    av_freep(c->key);
+    av_freep(c->iv);
     return ret;
 }
 
@@ -157,8 +157,6 @@ static int crypto_close(URLContext *h)
     if (c->hd)
         ffurl_close(c->hd);
     av_freep(&c->aes);
-    av_freep(&c->key);
-    av_freep(&c->iv);
     return 0;
 }
 


More information about the ffmpeg-devel mailing list