diff options
| author | Martin Wilck <[email protected]> | 2019-04-29 09:48:15 +0000 |
|---|---|---|
| committer | Mike Snitzer <[email protected]> | 2019-04-30 20:51:30 +0000 |
| commit | 940bc471780b004a5277c1931f52af363c2fc9da (patch) | |
| tree | f32e4a2e09e7329d7ae3d966d521214a51907e56 /lib/test_stackinit.c | |
| parent | dm init: fix max devices/targets checks (diff) | |
| download | kernel-940bc471780b004a5277c1931f52af363c2fc9da.tar.gz kernel-940bc471780b004a5277c1931f52af363c2fc9da.zip | |
dm mpath: always free attached_handler_name in parse_path()
Commit b592211c33f7 ("dm mpath: fix attached_handler_name leak and
dangling hw_handler_name pointer") fixed a memory leak for the case
where setup_scsi_dh() returns failure. But setup_scsi_dh may return
success and not "use" attached_handler_name if the
retain_attached_hwhandler flag is not set on the map. As setup_scsi_sh
properly "steals" the pointer by nullifying it, freeing it
unconditionally in parse_path() is safe.
Fixes: b592211c33f7 ("dm mpath: fix attached_handler_name leak and dangling hw_handler_name pointer")
Cc: [email protected]
Reported-by: Yufen Yu <[email protected]>
Signed-off-by: Martin Wilck <[email protected]>
Signed-off-by: Mike Snitzer <[email protected]>
Diffstat (limited to 'lib/test_stackinit.c')
0 files changed, 0 insertions, 0 deletions
