]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
[PATCH] PCI: fix hotplug double free
authoralexn@dsv.su.se <alexn@dsv.su.se>
Sun, 13 Mar 2005 05:43:53 +0000 (21:43 -0800)
committerGreg KH <gregkh@suse.de>
Thu, 12 May 2005 17:00:09 +0000 (10:00 -0700)
[PATCH] PCI: fix hotplug double free

With the brackets missed out func could be freed twice.

Found by Coverity tool

Signed-off-by: Alexander Nyberg <alexn@dsv.su.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pci/hotplug/pciehp_ctrl.c

index 279f53d78608d057dfed17bc451270dc8212eb8e..0dbcf04aa35e4683a94f5d0779027a44aa4fb9a1 100644 (file)
@@ -1354,10 +1354,11 @@ static u32 remove_board(struct pci_func *func, struct controller *ctrl)
                                dbg("PCI Bridge Hot-Remove s:b:d:f(%02x:%02x:%02x:%02x)\n", 
                                        ctrl->seg, func->bus, func->device, func->function);
                                bridge_slot_remove(func);
-                       } else
+                       } else {
                                dbg("PCI Function Hot-Remove s:b:d:f(%02x:%02x:%02x:%02x)\n", 
                                        ctrl->seg, func->bus, func->device, func->function);
                                slot_remove(func);
+                       }
 
                        func = pciehp_slot_find(ctrl->slot_bus, device, 0);
                }