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
d4bf3c9c94
commit
f9325df0fc
@ -2749,6 +2749,8 @@ freePGconn(PGconn *conn)
|
|||||||
free(conn->events[i].name);
|
free(conn->events[i].name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (conn->client_encoding_initial)
|
||||||
|
free(conn->client_encoding_initial);
|
||||||
if (conn->events)
|
if (conn->events)
|
||||||
free(conn->events);
|
free(conn->events);
|
||||||
if (conn->pghost)
|
if (conn->pghost)
|
||||||
|
Loading…
Reference in New Issue
Block a user