mirror of
https://github.com/postgres/postgres.git
synced 2026-04-15 22:10:45 -04:00
libpq: Fix memory leak
If a client encoding is specified as a connection parameter (or environment variable), internal storage allocated for it would never be freed.
This commit is contained in:
parent
ad05b5d28d
commit
0ba7ff5fa5
1 changed files with 2 additions and 0 deletions
|
|
@ -2744,6 +2744,8 @@ freePGconn(PGconn *conn)
|
|||
free(conn->events[i].name);
|
||||
}
|
||||
|
||||
if (conn->client_encoding_initial)
|
||||
free(conn->client_encoding_initial);
|
||||
if (conn->events)
|
||||
free(conn->events);
|
||||
if (conn->pghost)
|
||||
|
|
|
|||
Loading…
Reference in a new issue