Commit 584dbe94 authored by Daniel Marjamäki's avatar Daniel Marjamäki Committed by David S. Miller

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: default avatarDaniel Marjamäki <danielm77@spray.se>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent df1c46b2
...@@ -947,8 +947,10 @@ int netxen_pinit_from_rom(struct netxen_adapter *adapter, int verbose) ...@@ -947,8 +947,10 @@ int netxen_pinit_from_rom(struct netxen_adapter *adapter, int verbose)
} }
for (i = 0; i < n; i++) { for (i = 0; i < n; i++) {
if (netxen_rom_fast_read(adapter, 8*i + 4*offset, &val) != 0 || 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; return -EIO;
}
buf[i].addr = addr; buf[i].addr = addr;
buf[i].data = val; buf[i].data = val;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment