[libbluray-devel] [PATCH] Fixed memory leaks.

John Stebbins stebbins at jetheaddev.com
Sun May 27 21:25:56 CEST 2012


On 05/27/2012 06:11 PM, Ferdinand Holzer wrote:
> Well, since there's a check at allocation time (against
> ss->sa_num_primary_audio_ref, ss->sv_num_secondary_audio_ref and
> ss->sv_num_pip_pg_ref)
> I'd prefer to keep the check in some way, either a NULL check or against
> *_num_*
>
> What do you think?

It is not necessary to test *any* pointer for null before calling free. 
It is safe to call free on a null pointer.


More information about the libbluray-devel mailing list