summaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/pciehp_ctrl.c
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2010-01-06 17:47:56 +0100
committerJesse Barnes <jbarnes@virtuousgeek.org>2010-02-22 16:16:57 -0800
commit6fcaf17ac7a512227112ac81c0e1a5862bab57a6 (patch)
treea238d8a279f7fbc742b606b58b421ea2ea297403 /drivers/pci/hotplug/pciehp_ctrl.c
parent3b7a17fcdae532d29dffab9d564a28be08960988 (diff)
downloadblackbird-op-linux-6fcaf17ac7a512227112ac81c0e1a5862bab57a6.tar.gz
blackbird-op-linux-6fcaf17ac7a512227112ac81c0e1a5862bab57a6.zip
PCI hotplug: fix memory leaks
Stanse found a cut&pasted memory leak in pciehp_queue_pushbutton_work and shpchp_queue_pushbutton_work. info is not freed/assigned on all paths. Fix that. Reviewed-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/hotplug/pciehp_ctrl.c')
-rw-r--r--drivers/pci/hotplug/pciehp_ctrl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c
index d6ac1b261dd9..9a7f247e8ac1 100644
--- a/drivers/pci/hotplug/pciehp_ctrl.c
+++ b/drivers/pci/hotplug/pciehp_ctrl.c
@@ -341,6 +341,7 @@ void pciehp_queue_pushbutton_work(struct work_struct *work)
p_slot->state = POWERON_STATE;
break;
default:
+ kfree(info);
goto out;
}
queue_work(pciehp_wq, &info->work);
OpenPOWER on IntegriCloud