[vlc-devel] commit: Fix memory leak (CID 92) ( Rémi Denis-Courmont )
Marnik Vander Elst
marnik.vander.elst at gmail.com
Mon Jun 2 13:01:46 CEST 2008
Might be a silly question, but why the goto instead of just freeing before
the return NULL (in each block)? I know code duplication isn't a good idea,
but neither is goto afaik. Please enlighten me :)
2008/6/2, Pierre d'Herbemont <pdherbemont at free.fr>:
> On Jun 2, 2008, at 11:49 AM, Dominique Leuenberger wrote:
> > Quoting git version control <git at videolan.org>:
> >> vlc | branch: 0.8.6-bugfix | Rémi Denis-Courmont
> >> <rdenis at simphalempin.com> | Sat May 31 23:19:32 2008 +0300|
> >> [bd6877f9e3e0738013521bc98fe6bd12697a59ce]
> >> + goto error;
> > WOW! And I thought the times of 'goto' are over for good. I've seen
> > that you can use it twice.. but is this sacrifice really worthy?
> Well, goto are not over for good, especially in C.
> In that precise use it is the most appropriate and common in C code.
> Don't worry, it is being used wisely.
> But you can try to look for goto abuse in VLC code if you like :)
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vlc-devel