diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2018-03-13 16:50:06 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-16 11:42:12 -0400 |
commit | fa6a91e9b907231d2e38ea5ed89c537b3525df3d (patch) | |
tree | 8ddaa46d362cc983b2ca956074e3f174f9c1e858 /net/iucv | |
parent | 484d802d0f2f29c335563fcac2a8facf174a1bbc (diff) | |
download | op-kernel-dev-fa6a91e9b907231d2e38ea5ed89c537b3525df3d.zip op-kernel-dev-fa6a91e9b907231d2e38ea5ed89c537b3525df3d.tar.gz |
net/iucv: Free memory obtained by kzalloc
Free memory by calling put_device(), if afiucv_iucv_init is not
successful.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/iucv')
-rw-r--r-- | net/iucv/af_iucv.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c index 1e8cc7b..9e2643a 100644 --- a/net/iucv/af_iucv.c +++ b/net/iucv/af_iucv.c @@ -2433,9 +2433,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: |