summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorStefan Haberland <sth@linux.ibm.com>2019-12-19 09:43:51 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-12 12:12:00 +0100
commit66aa3bf42c2c009a14c3cf0214b95a32c11abc9e (patch)
tree24c9a41c4eda529aae9aef5810f0741868df667a /block
parent29753fc2f8d0b406f2435c53f5e49c959c381ac5 (diff)
downloadlinux-stable-66aa3bf42c2c009a14c3cf0214b95a32c11abc9e.tar.gz
linux-stable-66aa3bf42c2c009a14c3cf0214b95a32c11abc9e.tar.bz2
linux-stable-66aa3bf42c2c009a14c3cf0214b95a32c11abc9e.zip
s390/dasd: fix memleak in path handling error case
[ Upstream commit 00b39f698a4f1ee897227cace2e3937fc4412270 ] If for whatever reason the dasd_eckd_check_characteristics() function exits after at least some paths have their configuration data allocated those data is never freed again. In the error case the device->private pointer is set to NULL and dasd_eckd_uncheck_device() will exit without freeing the path data because of this NULL pointer. Fix by calling dasd_eckd_clear_conf_data() for error cases. Also use dasd_eckd_clear_conf_data() in dasd_eckd_uncheck_device() to avoid code duplication. Reported-by: Qian Cai <cai@lca.pw> Reviewed-by: Jan Hoeppner <hoeppner@linux.ibm.com> Signed-off-by: Stefan Haberland <sth@linux.ibm.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions