On Mon, Aug 23, 2010 at 01:40:15PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > On 08:24 Mon 23 Aug , Sascha Hauer wrote: > > menu_free and menu_entry_free are called on not fully initialized > > entries, so we have to check for validity before freeing the > > members. > > > I disagree free is suposed to not fail evenif we pass a NULL pointer Ack. (ie. free must accept NULL without barfing.) free(3) has this feature: "free() frees the memory space pointed to by ptr [...]. If ptr is NULL, no operation is performed." and kfree in the kernel accepts NULL, too. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox