Skip to content
Snippets Groups Projects
Commit 651ef90f authored by javier Martin's avatar javier Martin Committed by Ben Warren
Browse files

mxc_fec: avoid free() calls to already freed pointers.


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: default avatarJavier Martin <javier.martin@vista-silicon.com>
Signed-off-by: default avatarBen Warren <biggerbadderben@gmail.com>
parent e8f1546a
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment