s390/zcrypt: don't leak memory if dev_set_name() fails
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 31 Aug 2023 10:59:59 +0000 (13:59 +0300)
committerHeiko Carstens <hca@linux.ibm.com>
Tue, 5 Sep 2023 18:12:51 +0000 (20:12 +0200)
commit6252f47b78031979ad919f971dc8468b893488bd
treeee2bb9eed8abb5aa70ebd897ab1b05be771d0483
parent08d90f46c7ddff0cbd3fefbddf1d2bd53ce4b477
s390/zcrypt: don't leak memory if dev_set_name() fails

When dev_set_name() fails, zcdn_create() doesn't free the newly
allocated resources. Do it.

Fixes: 00fab2350e6b ("s390/zcrypt: multiple zcrypt device nodes support")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230831110000.24279-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
drivers/s390/crypto/zcrypt_api.c