Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d0236f8f authored by Akinobu Mita's avatar Akinobu Mita Committed by David S. Miller
Browse files

iucv: fix memory leak in cpu hotplug error path.



Fix memory leak in error path in CPU_UP_PREPARE notifier.

Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0b57664c
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -567,8 +567,11 @@ static int __cpuinit iucv_cpu_notify(struct notifier_block *self,
			return NOTIFY_BAD;
			return NOTIFY_BAD;
		iucv_param[cpu] = kmalloc_node(sizeof(union iucv_param),
		iucv_param[cpu] = kmalloc_node(sizeof(union iucv_param),
				     GFP_KERNEL|GFP_DMA, cpu_to_node(cpu));
				     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;
			return NOTIFY_BAD;
		}
		break;
		break;
	case CPU_UP_CANCELED:
	case CPU_UP_CANCELED:
	case CPU_UP_CANCELED_FROZEN:
	case CPU_UP_CANCELED_FROZEN: