[Ffmpeg-devel] [PATCH] Fix leak of AVPacket data in ffserver
Christian Iversen
chrivers
Tue Jan 24 01:19:06 CET 2006
On Tuesday 24 January 2006 00:56, Bryan Mayland wrote:
> Christian Iversen wrote:
> > --- ffserver.c 12 Jan 2006 22:43:14 -0000 1.104
> > +++ ffserver.c 23 Jan 2006 22:36:23 -0000
> > @@ -2169,6 +2175,7 @@
> > ret = url_open_dyn_buf(&ctx->pb);
> > }
> > if (ret < 0) {
> > + av_free_packet(&pkt);
> > /* XXX: potential leak */
> > return -1;
> > }
> >
> > Is that "XXX: potential leak" connected to the fix you just sent here? In
> > that case, I vote for its removal :-)
>
> It is related yes, but I was hesitant to remove it pending further
> review of the rest of the code in that case (~175 lines of code with
> gotos). I found it odd that there would be a "potential leak" fixme
> where the only problem was freeing the packet data (considering it is
> handled properly in other break conditions) so I thought I'd leave it
> in. Then, someone would see it in the patch and say "Hey, we can remove
> that fixme now", I wouldn't have removed a comment I should have left,
> and everyone goes home happy :)
Well, actually I couldn't agree more - and I'm sorry you had to look at gotos.
They ought to be a thing of the past :-)
--
Regards,
Christian Iversen
More information about the ffmpeg-devel
mailing list