diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2008-07-15 11:09:53 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-15 11:09:53 +0200 |
commit | d0236f8f8223ad841f461ea3a635d452d194806b (patch) | |
tree | e708af936e3ba5237ae5cbfdcc44368f20a0980f /net/iucv | |
parent | wireless: fix warnings from QoS patch (diff) | |
download | linux-d0236f8f8223ad841f461ea3a635d452d194806b.tar.xz linux-d0236f8f8223ad841f461ea3a635d452d194806b.zip |
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>
Diffstat (limited to 'net/iucv')
-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, return 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: |