mirror of
https://github.com/containers/fuse-overlayfs.git
synced 2025-09-11 16:27:14 -04:00
main: avoid double free on cleanup
the cleanup_node_init label already takes care of it. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
83ae5cc252
commit
33a3a7970e
12
main.c
12
main.c
@ -1097,19 +1097,13 @@ make_whiteout_node (const char *path, const char *name)
|
|||||||
|
|
||||||
new_name = strdup (name);
|
new_name = strdup (name);
|
||||||
if (new_name == NULL)
|
if (new_name == NULL)
|
||||||
{
|
return NULL;
|
||||||
free (ret);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
node_set_name (ret, new_name);
|
node_set_name (ret, new_name);
|
||||||
|
|
||||||
ret->path = strdup (path);
|
ret->path = strdup (path);
|
||||||
if (ret->path == NULL)
|
if (ret->path == NULL)
|
||||||
{
|
return NULL;
|
||||||
free (new_name);
|
|
||||||
free (ret);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret->whiteout = 1;
|
ret->whiteout = 1;
|
||||||
ret->ino = &dummy_ino;
|
ret->ino = &dummy_ino;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user