[MPlayer-dev-eng] Re: [PATCH] Avoid freeing of unallocated memory in tv.c

Nico Sabbi nicola_sabbi at fastwebnet.it
Sun Jan 7 21:05:31 CET 2007


Vladimir Voroshilov wrote:
> 2007/1/8, Nico Sabbi <nicola_sabbi at fastwebnet.it>:
> 
>> Vladimir Voroshilov wrote:
>> > 2007/1/2, Vladimir Voroshilov <voroshil at gmail.com>:
>> >
>> >  int tv_uninit(tvi_handle_t *tvh)
>> >  {
>> > -    return(tvh->functions->uninit(tvh->priv));
>> > +    if(!tvh) return 1;
>> > +    if (!tvh->priv) return 1;
>>
>> if(!tvh || !tvh->priv) return 1;
>> but I have some doubt about the code quality of this double check

it's not safer nor less safe: they are equivalent.
Anyway I don't really care
-- 
"Without a frontend, mplayer is useless" - someone in mplayer-users



More information about the MPlayer-dev-eng mailing list