Skip to content

Commit

Permalink
firewire: fix struct fw_node memory leak
Browse files Browse the repository at this point in the history
With the bus_resets patch applied, it is easy to see this memory leak
by repeatedly resetting the firewire bus while running slabtop in
another window.  Just watch kmalloc-32 grow and grow...

Signed-off-by: Jay Fenlason <fenlason@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
  • Loading branch information
Jay Fenlason authored and Stefan Richter committed Oct 26, 2008
1 parent 4f9740d commit 77e5571
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/firewire/fw-topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ static void
update_tree(struct fw_card *card, struct fw_node *root)
{
struct list_head list0, list1;
struct fw_node *node0, *node1;
struct fw_node *node0, *node1, *next1;
int i, event;

INIT_LIST_HEAD(&list0);
Expand Down Expand Up @@ -485,7 +485,9 @@ update_tree(struct fw_card *card, struct fw_node *root)
}

node0 = fw_node(node0->link.next);
node1 = fw_node(node1->link.next);
next1 = fw_node(node1->link.next);
fw_node_put(node1);
node1 = next1;
}
}

Expand Down

0 comments on commit 77e5571

Please sign in to comment.