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>
This commit is contained in:
parent
df1c46b2b6
commit
584dbe9475
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue