diff options
Diffstat (limited to 'libmount/src/context_umount.c')
-rw-r--r-- | libmount/src/context_umount.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libmount/src/context_umount.c b/libmount/src/context_umount.c index 2b791c44d..b02902c45 100644 --- a/libmount/src/context_umount.c +++ b/libmount/src/context_umount.c @@ -161,7 +161,12 @@ try_loopdev: struct stat st; if (stat(tgt, &st) == 0 && S_ISREG(st.st_mode)) { - int count = loopdev_count_by_backing_file(tgt, &loopdev); + int count; + + cn_tgt = mnt_resolve_path(tgt, cache); + count = loopdev_count_by_backing_file(cn_tgt, &loopdev); + if (!cache) + free(cn_tgt); if (count == 1) { DBG(CXT, mnt_debug_h(cxt, "umount: %s --> %s (retry)", tgt, loopdev)); |