aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/dev-replace.c
diff options
context:
space:
mode:
authorStefan Haberland <[email protected]>2019-12-19 08:43:51 +0000
committerJens Axboe <[email protected]>2019-12-20 18:52:01 +0000
commit00b39f698a4f1ee897227cace2e3937fc4412270 (patch)
treeb37bde60d5d9ccc3e23b280262756d533d137734 /fs/btrfs/dev-replace.c
parents390/dasd/cio: Interpret ccw_device_get_mdc return value correctly (diff)
downloadkernel-00b39f698a4f1ee897227cace2e3937fc4412270.tar.gz
kernel-00b39f698a4f1ee897227cace2e3937fc4412270.zip
s390/dasd: fix memleak in path handling error case
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 <[email protected]> Reviewed-by: Jan Hoeppner <[email protected]> Signed-off-by: Stefan Haberland <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions