On Sat, Feb 14, 2015 at 11:57:30AM +0100, Nicolas George wrote: > Le sextidi 26 pluviôse, an CCXXIII, Michael Niedermayer a écrit : > > > +static void run_lavu_twofish(uint8_t *output, > > > + const uint8_t *input, unsigned size) > > > +{ > > > + static struct AVTWOFISH *twofish; > > > + if (!twofish && !(twofish = av_twofish_alloc())) > > the memory should be freed somewhere > > All the other benchmarks already work like that, without freeing. > > > otherwise memory debuggers would likely display a warning about a > > memleak (which could make it harder to see real problems) > > The variable is declared static, so the pointed memory is considered still > reachable even at the end of the program. If a memory debugger is not > capable of seeing that, it is not worth using. The same happens for the > default mutex and co.
indeed ive no more comments, the patch should be fine [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Its not that you shouldnt use gotos but rather that you should write readable code and code with gotos often but not always is less readable
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel