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:
Peter Eisentraut 2012-03-07 23:35:03 +02:00
parent d4bf3c9c94
commit f9325df0fc
1 changed files with 2 additions and 0 deletions

View File

@ -2749,6 +2749,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)