fixed logFile memory leak

This commit is contained in:
Václav Šmejkal 2022-12-04 19:19:41 +01:00
parent 731b33e24e
commit 054c7647a1
No known key found for this signature in database
GPG Key ID: FD749A97DF2D5E19

View File

@ -18,6 +18,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <why2/logger/utils.h> #include <why2/logger/utils.h>
#include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <why2/logger/flags.h> #include <why2/logger/flags.h>
@ -25,4 +26,5 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
void deallocateLogger(logFile logger) void deallocateLogger(logFile logger)
{ {
close(logger.file); close(logger.file);
free(logger.fileName);
} }