diff options
author | Matthias Kaehlcke <matthias@kaehlcke.net> | 2010-01-21 22:16:34 +0100 |
---|---|---|
committer | Ben Warren <biggerbadderben@gmail.com> | 2010-01-31 22:34:33 -0800 |
commit | 07c966066b977b24f4b08b1684eed130f463b4c6 (patch) | |
tree | 93f9ca0f72a89baa3a2cdcdc291731233b3ad3a8 /drivers | |
parent | c4168af3ba03c17a73751b98c124bbd2e3e1f5b0 (diff) | |
download | u-boot-imx-07c966066b977b24f4b08b1684eed130f463b4c6.zip u-boot-imx-07c966066b977b24f4b08b1684eed130f463b4c6.tar.gz u-boot-imx-07c966066b977b24f4b08b1684eed130f463b4c6.tar.bz2 |
cs8900_initialize() cleanup
cs8900_initialize(): remove unecessary calls to free() and fix memory leak
Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/cs8900.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/cs8900.c b/drivers/net/cs8900.c index df36004..9424fb2 100644 --- a/drivers/net/cs8900.c +++ b/drivers/net/cs8900.c @@ -308,14 +308,13 @@ int cs8900_initialize(u8 dev_num, int base_addr) dev = malloc(sizeof(*dev)); if (!dev) { - free(dev); return 0; } memset(dev, 0, sizeof(*dev)); priv = malloc(sizeof(*priv)); if (!priv) { - free(priv); + free(dev); return 0; } memset(priv, 0, sizeof(*priv)); |