From 33a3a7970e3394bf9ec67f967c021d88f6bfe01b Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Thu, 30 Apr 2020 11:01:12 +0200 Subject: [PATCH] main: avoid double free on cleanup the cleanup_node_init label already takes care of it. Signed-off-by: Giuseppe Scrivano --- main.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/main.c b/main.c index 0f1ff13..f14552f 100644 --- a/main.c +++ b/main.c @@ -1097,19 +1097,13 @@ make_whiteout_node (const char *path, const char *name) new_name = strdup (name); if (new_name == NULL) - { - free (ret); - return NULL; - } + return NULL; + node_set_name (ret, new_name); ret->path = strdup (path); if (ret->path == NULL) - { - free (new_name); - free (ret); - return NULL; - } + return NULL; ret->whiteout = 1; ret->ino = &dummy_ino;