libzutil: fix dm_get_underlying_path() return if not a DM device
For example, this would happily return "/dev/(null)" for /dev/sda1 Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #11935
This commit is contained in:
parent
ccb46cab50
commit
1a7d7182ac
|
@ -346,7 +346,7 @@ end:
|
||||||
free(tmp);
|
free(tmp);
|
||||||
free(realp);
|
free(realp);
|
||||||
|
|
||||||
if (!path) {
|
if (!path && first_path) {
|
||||||
/*
|
/*
|
||||||
* None of the underlying paths had a link back to their
|
* None of the underlying paths had a link back to their
|
||||||
* enclosure devices. Throw up out hands and return the first
|
* enclosure devices. Throw up out hands and return the first
|
||||||
|
|
Loading…
Reference in New Issue