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:
Daniel Marjamäki 2009-01-29 08:55:56 +00:00 committed by David S. Miller
parent df1c46b2b6
commit 584dbe9475
1 changed files with 3 additions and 1 deletions

View File

@ -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;