From: Ben Warren <biggerbadderben@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [u-boot] [PATCH] [2/2] [v1.4] mxc_fec: avoid free() calls to already freed pointers.
Date: Mon, 09 Nov 2009 22:53:41 -0800 [thread overview]
Message-ID: <4AF90DF5.30303@gmail.com> (raw)
In-Reply-To: <eedb5540910290022o5b0f8866oe145566d54a6628b@mail.gmail.com>
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@vista-silicon.com>
> --
> drivers/net/fec_mxc.c | 12 +++++++-----
> 1 files changed, 7 insertions(+), 5 deletions(-)
>
Applied to net repo.
thanks,
Ben
prev parent reply other threads:[~2009-11-10 6:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-29 7:22 [U-Boot] [u-boot] [PATCH] [2/2] [v1.4] mxc_fec: avoid free() calls to already freed pointers javier Martin
2009-11-10 6:53 ` Ben Warren [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AF90DF5.30303@gmail.com \
--to=biggerbadderben@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox