diff --git a/libmount/src/context_umount.c b/libmount/src/context_umount.c index 36ed435cf5..17ec1f0a48 100644 --- a/libmount/src/context_umount.c +++ b/libmount/src/context_umount.c @@ -150,7 +150,7 @@ static int is_associated_fs(const char *devname, struct libmnt_fs *fs) int flags = 0; /* check if it begins with /dev/loop */ - if (strncmp(devname, _PATH_DEV_LOOP, sizeof(_PATH_DEV_LOOP))) + if (strncmp(devname, _PATH_DEV_LOOP, sizeof(_PATH_DEV_LOOP) - 1)) return 0; src = mnt_fs_get_srcpath(fs);