mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 23:46:17 +01:00
glocalfile: Fix memory leak in find_topdir_for()
Coverity CID 1325398.
This commit is contained in:
parent
4b2d92a864
commit
9275be383f
@ -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 *
|
||||
|
Loading…
Reference in New Issue
Block a user