We print the current working directory. This introduces a small memory leak as the space allocated to store this path is not freed, but we don't use it after it is printed to the screen.
To Reproduce
This happens every time you run the code. You can see the memory leak using address sanitizer or valgrind.
Expected behavior
Should store the directory name in a temporary variable so that it can be freed after printing.
Describe the bug
We print the current working directory. This introduces a small memory leak as the space allocated to store this path is not freed, but we don't use it after it is printed to the screen.
To Reproduce
This happens every time you run the code. You can see the memory leak using address sanitizer or valgrind.
Expected behavior
Should store the directory name in a temporary variable so that it can be freed after printing.
Screenshots
N/A
Input files
N/A
Please complete the following information:
Additional context
I will push a patch soon.