[U-Boot] [u-boot] [PATCH] [2/2] [v1.4] mxc_fec: avoid free() calls to already freed pointers.

Ben Warren biggerbadderben at gmail.com
Tue Nov 10 07:53:41 CET 2009


javier Martin wrote:
> Sometimes, inside NetLoop, eth_halt() is called before eth_init() has
> been called. This is harmless except for free() calls to pointers
> which have not been allocated yet.
>
> This patch initializes those pointers to NULL and allocates them only
> the first time. This way we can get rid of free calls in halt callback.
>
> This has been tested in i.MX27 Litekit board and eldk-4.2 toolchains.
>
> Signed-off-by: Javier Martin <javier.martin at vista-silicon.com>
> --
>  drivers/net/fec_mxc.c |   12 +++++++-----
>  1 files changed, 7 insertions(+), 5 deletions(-)
>   
Applied to net repo.

thanks,
Ben


More information about the U-Boot mailing list