projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c4168af
)
cs8900_initialize() cleanup
author
Matthias Kaehlcke
<matthias@kaehlcke.net>
Thu, 21 Jan 2010 21:16:34 +0000
(22:16 +0100)
committer
Ben Warren
<biggerbadderben@gmail.com>
Mon, 1 Feb 2010 06:34:33 +0000
(22:34 -0800)
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>
drivers/net/cs8900.c
patch
|
blob
|
history
diff --git
a/drivers/net/cs8900.c
b/drivers/net/cs8900.c
index df360042be8d887b83d6eee98869026395d9741b..9424fb2bb69cc697ea0fb3ab1a1dc54f511d7aec 100644
(file)
--- 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(
pri
v);
+ free(
de
v);
return 0;
}
memset(priv, 0, sizeof(*priv));