btrfs-progs: fix test for return of realpath in find_mount_root()
find_mount_root() tries to test for realpath() failure, but tests the wrong value. Fix it. Resolves-Coverity-CID: 1125940 Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
This commit is contained in:
parent
6e6e886809
commit
12c3c9509b
|
@ -98,7 +98,7 @@ int find_mount_root(const char *path, char **mount_root)
|
|||
|
||||
ret = 0;
|
||||
*mount_root = realpath(longest_match, NULL);
|
||||
if (!mount_root)
|
||||
if (!*mount_root)
|
||||
ret = -errno;
|
||||
|
||||
free(longest_match);
|
||||
|
|
Loading…
Reference in New Issue