Skip to content

Commit

Permalink
fix small memory leak of 'encoding' char array in 'CC_initial_log' fu…
Browse files Browse the repository at this point in the history
…nction (#67)

Co-authored-by: iopnc <[email protected]>
  • Loading branch information
iobnc and iopnc authored Oct 16, 2024
1 parent 7da4711 commit c362d98
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit c362d98

Please sign in to comment.