Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0ba7ff5

Browse files
committed
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.
1 parent ad05b5d commit 0ba7ff5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/interfaces/libpq/fe-connect.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2744,6 +2744,8 @@ freePGconn(PGconn *conn)
27442744
free(conn->events[i].name);
27452745
}
27462746

2747+
if (conn->client_encoding_initial)
2748+
free(conn->client_encoding_initial);
27472749
if (conn->events)
27482750
free(conn->events);
27492751
if (conn->pghost)

0 commit comments

Comments
 (0)