From 48977c0fe15bfa35032ca28cb851b8fee324eaec Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Tue, 22 Nov 2022 18:50:41 +0100 Subject: [PATCH] added on byte to writeLog's buffer allocation I mean... Valgrind told me to. --- src/logger/lib/logger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/logger/lib/logger.c b/src/logger/lib/logger.c index d89eed5..15a4c04 100644 --- a/src/logger/lib/logger.c +++ b/src/logger/lib/logger.c @@ -57,7 +57,7 @@ int initLogger(char *directoryPath) void writeLog(int loggerFile, char *logMessage) { //VARIABLES - char *buffer = malloc(strlen(WRITE_FORMAT) + strlen(logMessage) + 1); + char *buffer = malloc(strlen(WRITE_FORMAT) + strlen(logMessage) + 2); time_t timeL = time(NULL); struct tm tm = *localtime(&timeL);