Commit 1a7d7182 authored by наб's avatar наб Committed by Brian Behlendorf
Browse files

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: default avatarTony Hutter <hutter2@llnl.gov>
Signed-off-by: default avatarAhelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #11935
parent ccb46cab
......@@ -346,7 +346,7 @@ end:
free(tmp);
free(realp);
if (!path) {
if (!path && first_path) {
/*
* None of the underlying paths had a link back to their
* enclosure devices. Throw up out hands and return the first
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment