diff options
author | Daniel Marjamäki <danielm77@spray.se> | 2009-01-29 09:55:56 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-30 01:56:14 +0100 |
commit | 584dbe9475313e117abf9d2af88164edfd429c9a (patch) | |
tree | 2e28133bb818dac6af03e1a00b19bd6235621ce6 | |
parent | tun: Add some missing TUN compat ioctl translations. (diff) | |
download | linux-584dbe9475313e117abf9d2af88164edfd429c9a.tar.xz linux-584dbe9475313e117abf9d2af88164edfd429c9a.zip |
netxen: fix memory leak in drivers/net/netxen_nic_init.c
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>
-rw-r--r-- | drivers/net/netxen/netxen_nic_init.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c index ca7c8d8050c9..ffd37bea1628 100644 --- 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; |