On Wed, 7 Sep 2011 12:35:32 -0700, Alex Converse <[email protected]> wrote: > On Wed, Sep 7, 2011 at 12:31 PM, Anton Khirnov <[email protected]> wrote: > > From: Michael Niedermayer <[email protected]> > > > > Signed-off-by: Anton Khirnov <[email protected]> > > --- > > libavfilter/avfilter.c | 4 ++-- > > 1 files changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c > > index abeae14..86d961b 100644 > > --- a/libavfilter/avfilter.c > > +++ b/libavfilter/avfilter.c > > @@ -75,8 +75,8 @@ void avfilter_unref_buffer(AVFilterBufferRef *ref) > > return; > > if (!(--ref->buf->refcount)) > > ref->buf->free(ref->buf); > > - av_free(ref->video); > > - av_free(ref->audio); > > + av_freep(&ref->video); > > + av_freep(&ref->audio); > > av_free(ref); > > } > > Why? These pointers aren't left dangling. The next thing we do is free > ref itself.
Why not? AFAIK we wanted to get rid of av_free and use av_freep everywhere. -- Anton Khirnov _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
