iucv: fix memory leak in cpu hotplug error path.
Subsystems (4)
PATCH 1/1 iucv: fix memory leak in cpu hotplug error path.
Fix memory leak in error path in CPU_UP_PREPARE notifier.
Signed-off-by Akinobu Mita <[email protected]>
Cc David S. Miller <[email protected]>
Cc Ursula Braun <[email protected]>
--- net/iucv/iucv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
net/iucv/iucv.c +4 -1
@@ -567,8 +567,11 @@ static int __cpuinit iucv_cpu_notify(strreturn NOTIFY_BAD ; iucv_param[cpu] =kmalloc_node (sizeof (union iucv_param ),GFP_KERNEL |GFP_DMA ,cpu_to_node (cpu)); -if (!iucv_param[cpu]) +if (!iucv_param[cpu]) { +kfree (iucv_irq_data[cpu]); + iucv_irq_data[cpu] =NULL ;return NOTIFY_BAD ; + }break ;case CPU_UP_CANCELED :case CPU_UP_CANCELED_FROZEN :
From: Akinobu Mita <[email protected]>
Date: Tue, 15 Jul 2008 17:10:25 +0900
Quoted 3 lines
Fix memory leak in error path in
CPU_UP_PREPAREnotifier.Signed-off-by Akinobu Mita <[email protected]>
Applied, thank you.