mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
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 <[email protected]> Reviewed-by: Cornelia Huck <[email protected]> Signed-off-by: Ursula Braun <[email protected]> Signed-off-by: Julian Wiedmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
1 parent
484d802d0f
commit
fa6a91e9b9
1 file changed
+3
-1
+3
-1
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user