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

Commit 800c5054 authored by Arvind Yadav's avatar Arvind Yadav Committed by Greg Kroah-Hartman
Browse files

net/iucv: Free memory obtained by kzalloc




[ Upstream commit fa6a91e9b907231d2e38ea5ed89c537b3525df3d ]

Free memory by calling put_device(), if afiucv_iucv_init is not
successful.

Signed-off-by: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
Signed-off-by: default avatarUrsula Braun <ursula.braun@de.ibm.com>
Signed-off-by: default avatarJulian Wiedmann <jwi@linux.vnet.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c24c4211
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2381,9 +2381,11 @@ static int afiucv_iucv_init(void)
	af_iucv_dev->driver = &af_iucv_driver;
	err = device_register(af_iucv_dev);
	if (err)
		goto out_driver;
		goto out_iucv_dev;
	return 0;

out_iucv_dev:
	put_device(af_iucv_dev);
out_driver:
	driver_unregister(&af_iucv_driver);
out_iucv: