Skip to content

Commit

Permalink
netxen: fix memory leak in drivers/net/netxen_nic_init.c
Browse files Browse the repository at this point in the history
For kernel bugzilla #12537:
http://bugzilla.kernel.org/show_bug.cgi?id=12537

Free memory.

Signed-off-by: Daniel Marjamäki <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Daniel Marjamäki authored and davem330 committed Jan 30, 2009
1 parent df1c46b commit 584dbe9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/netxen/netxen_nic_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 584dbe9

Please sign in to comment.