[MPlayer-cvslog] CVS: main/libmpdemux demuxer.c, 1.181, 1.182 demux_ogg.c, 1.65, 1.66
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Feb 6 20:44:54 CET 2005
Hi,
On Sun, Feb 06, 2005 at 01:36:57PM +0100, Moritz Bunkus wrote:
> > - free(ogg_d);
> > - return 0;
> > + goto err_out;
>
> ...
>
> > +err_out:
> > + demux_close_ogg(demuxer);
> > + return 0;
>
> Why not simply replace that free(ogg_d); with demux_close_ogg(demuxer)?
> The patch would have been smaller, no need for that ugly goto...
I have to admit I had a different solution first - but this solution
will still work when somebody introduces a local, malloc'ed variable
that demux_close_ogg doesn't free. In other words, in my experience goto
works very well aborting something.
But I don't mind if you revert and apply the other variant, sorry if I
was a bit fast in applying this.
Greetings,
Reimar Döffinger
More information about the MPlayer-cvslog
mailing list