glocalfile: Fix memory leak in find_topdir_for()

Coverity CID 1325398.
This commit is contained in:
Philip Withnall 2015-10-03 10:48:46 +01:00
parent 4b2d92a864
commit 9275be383f

View File

@ -1705,13 +1705,17 @@ static char *
find_topdir_for (const char *file)
{
char *dir;
char *mountpoint = NULL;
dev_t dir_dev;
dir = get_parent (file, &dir_dev);
if (dir == NULL)
return NULL;
return find_mountpoint_for (dir, dir_dev);
mountpoint = find_mountpoint_for (dir, dir_dev);
g_free (dir);
return mountpoint;
}
static char *