diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2008-07-15 05:09:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-15 05:09:53 -0400 |
commit | d0236f8f8223ad841f461ea3a635d452d194806b (patch) | |
tree | e708af936e3ba5237ae5cbfdcc44368f20a0980f | |
parent | 0b57664cf2393bc1eff594ff7e5ff26533843fe6 (diff) |
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 <akinobu.mita@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/iucv/iucv.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c index 531a206ce7a6..d8e0635aace0 100644 --- a/net/iucv/iucv.c +++ b/net/iucv/iucv.c | |||
@@ -567,8 +567,11 @@ static int __cpuinit iucv_cpu_notify(struct notifier_block *self, | |||
567 | return NOTIFY_BAD; | 567 | return NOTIFY_BAD; |
568 | iucv_param[cpu] = kmalloc_node(sizeof(union iucv_param), | 568 | iucv_param[cpu] = kmalloc_node(sizeof(union iucv_param), |
569 | GFP_KERNEL|GFP_DMA, cpu_to_node(cpu)); | 569 | GFP_KERNEL|GFP_DMA, cpu_to_node(cpu)); |
570 | if (!iucv_param[cpu]) | 570 | if (!iucv_param[cpu]) { |
571 | kfree(iucv_irq_data[cpu]); | ||
572 | iucv_irq_data[cpu] = NULL; | ||
571 | return NOTIFY_BAD; | 573 | return NOTIFY_BAD; |
574 | } | ||
572 | break; | 575 | break; |
573 | case CPU_UP_CANCELED: | 576 | case CPU_UP_CANCELED: |
574 | case CPU_UP_CANCELED_FROZEN: | 577 | case CPU_UP_CANCELED_FROZEN: |