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:
Eric Sandeen 2013-11-06 17:15:43 -06:00 committed by Chris Mason
parent 6e6e886809
commit 12c3c9509b
1 changed files with 1 additions and 1 deletions

View File

@ -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);