Oops memory leak - Now fixed :)

This commit is contained in:
Nikola
2026-07-05 01:29:04 +02:00
parent ba7989aab9
commit 9555b1f59c
+4 -2
View File
@@ -31,7 +31,7 @@ void benchmarking(size_t benchmarking_amount, int version_to_use, float complex
printf("Benchmarking V0 - highly optimized SIMD + Threading implementation\n");
tricorn_implementation = tricorn;
break;
case 1: // Uses unoptimised comparison implementation
case 1: // Uses unoptimised scalar comparison implementation
printf("Benchmarking V1 - unoptimized comparison implementation\n");
tricorn_implementation = tricorn_V1;
break;
@@ -169,7 +169,6 @@ int main(int argc, char** argv)
// fourth is "val" -> what to return when "--help" is given, returns "h"
int version_to_use = 0; // actual initial value
_Bool colored = 0; // actual initial value
_Bool will_benchmark = false; // actual initial value
@@ -193,6 +192,7 @@ int main(int argc, char** argv)
{
case 'V': // done, function needed
version_to_use = strtol(optarg,NULL,10);
printf("version is %d\n", version_to_use);
// call different version functions
@@ -338,6 +338,8 @@ int main(int argc, char** argv)
{
printf("\nDoing benchmarking. No images will be created\n");
benchmarking(amount_function_called,version_to_use,complexA,width,height,resolution,n,colored,tempArr);
free(tempArr);
free(output_data);
return 0;
}