projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df1c46b
)
netxen: fix memory leak in drivers/net/netxen_nic_init.c
author
Daniel Marjamäki
<danielm77@spray.se>
Thu, 29 Jan 2009 08:55:56 +0000
(08:55 +0000)
committer
David S. Miller
<davem@davemloft.net>
Fri, 30 Jan 2009 00:56:14 +0000
(16:56 -0800)
For kernel bugzilla #12537:
http://bugzilla.kernel.org/show_bug.cgi?id=12537
Free memory.
Signed-off-by: Daniel Marjamäki <danielm77@spray.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/netxen/netxen_nic_init.c
patch
|
blob
|
history
diff --git
a/drivers/net/netxen/netxen_nic_init.c
b/drivers/net/netxen/netxen_nic_init.c
index ca7c8d8050c998b158e451efe975be219b549771..ffd37bea1628b43452cf2749be07e5c9376591dc 100644
(file)
--- a/
drivers/net/netxen/netxen_nic_init.c
+++ b/
drivers/net/netxen/netxen_nic_init.c
@@
-947,8
+947,10
@@
int netxen_pinit_from_rom(struct netxen_adapter *adapter, int verbose)
}
for (i = 0; i < n; i++) {
if (netxen_rom_fast_read(adapter, 8*i + 4*offset, &val) != 0 ||
- netxen_rom_fast_read(adapter, 8*i + 4*offset + 4, &addr) != 0)
+ netxen_rom_fast_read(adapter, 8*i + 4*offset + 4, &addr) != 0) {
+ kfree(buf);
return -EIO;
+ }
buf[i].addr = addr;
buf[i].data = val;