aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire
diff options
context:
space:
mode:
authorJay Fenlason <fenlason@redhat.com>2008-10-16 18:00:15 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2008-10-26 05:27:00 -0400
commit77e557191701afa55ae7320d42ad6458a2ad292e (patch)
treec2956fc904fe0e13a950c34b645d8f122932fe0d /drivers/firewire
parent4f9740d4f5a17fa6a1b097fa3ccdfb7246660307 (diff)
firewire: fix struct fw_node memory leak
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>
Diffstat (limited to 'drivers/firewire')
-rw-r--r--drivers/firewire/fw-topology.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/firewire/fw-topology.c b/drivers/firewire/fw-topology.c
index c1b81077c4a8..5e204713002d 100644
--- a/drivers/firewire/fw-topology.c
+++ b/drivers/firewire/fw-topology.c
@@ -413,7 +413,7 @@ static void
413update_tree(struct fw_card *card, struct fw_node *root) 413update_tree(struct fw_card *card, struct fw_node *root)
414{ 414{
415 struct list_head list0, list1; 415 struct list_head list0, list1;
416 struct fw_node *node0, *node1; 416 struct fw_node *node0, *node1, *next1;
417 int i, event; 417 int i, event;
418 418
419 INIT_LIST_HEAD(&list0); 419 INIT_LIST_HEAD(&list0);
@@ -485,7 +485,9 @@ update_tree(struct fw_card *card, struct fw_node *root)
485 } 485 }
486 486
487 node0 = fw_node(node0->link.next); 487 node0 = fw_node(node0->link.next);
488 node1 = fw_node(node1->link.next); 488 next1 = fw_node(node1->link.next);
489 fw_node_put(node1);
490 node1 = next1;
489 } 491 }
490} 492}
491 493