From 831f786222b9d53bbbaee4fdbf331b72cf66f549 Mon Sep 17 00:00:00 2001 From: alessandro ferro <49845537+xfarrow@users.noreply.github.com> Date: Mon, 17 Apr 2023 10:17:34 +0200 Subject: [PATCH] Double free --- dircomp.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/dircomp.c b/dircomp.c index b9337c4..17023c0 100644 --- a/dircomp.c +++ b/dircomp.c @@ -189,7 +189,6 @@ bool analyze_directories(char* directory_to_analyze_1, char* directory_to_analyz , directory_to_analyze_2); if( arguments->f == true ) { - free( fullpath_file_helper ); free( directory_to_analyze_1 ); free( directory_to_analyze_2 ); closedir(directory); @@ -212,7 +211,6 @@ bool analyze_directories(char* directory_to_analyze_1, char* directory_to_analyz is_directory_equal = analyze_directories(subdirectory1, subdirectory2, arguments) && is_directory_equal; // Interrupt recursion if -f option is set if(arguments->f == true && is_directory_equal == false){ - free( fullpath_file_helper ); free( directory_to_analyze_1 ); free( directory_to_analyze_2 ); closedir( directory );