From c362d981c05014fed245f8c77de5cc642bd7d750 Mon Sep 17 00:00:00 2001 From: iobnc Date: Wed, 16 Oct 2024 15:40:44 +0300 Subject: [PATCH] fix small memory leak of 'encoding' char array in 'CC_initial_log' function (#67) Co-authored-by: iopnc --- connection.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/connection.c b/connection.c index 7837dbb..56e8957 100644 --- a/connection.c +++ b/connection.c @@ -1056,6 +1056,8 @@ static char CC_initial_log(ConnectionClass *self, const char *func) ci->drivers.extra_systable_prefixes, PRINT_NAME(ci->conn_settings), encoding ? encoding : ""); + if (encoding) + free(encoding); } if (self->status == CONN_DOWN) {