aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-connect.c
diff options
context:
space:
mode:
authorMagnus Hagander <magnus@hagander.net>2008-10-23 16:17:19 +0000
committerMagnus Hagander <magnus@hagander.net>2008-10-23 16:17:19 +0000
commit501e58ba4e02fbdf26fec8ef294983a4da8e3eb0 (patch)
tree5158d5952ac2ea6e8aa7dac0173d4cd3bf4f959a /src/interfaces/libpq/fe-connect.c
parent7028c13557067ec2cad0febcc0671551fce3190d (diff)
downloadpostgresql-501e58ba4e02fbdf26fec8ef294983a4da8e3eb0.tar.gz
postgresql-501e58ba4e02fbdf26fec8ef294983a4da8e3eb0.zip
Fix memory leak when using gsslib parameter in libpq connections
Diffstat (limited to 'src/interfaces/libpq/fe-connect.c')
-rw-r--r--src/interfaces/libpq/fe-connect.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index 0d2ec1dda65..54aa7103970 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.362 2008/09/22 14:21:44 tgl Exp $
+ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.363 2008/10/23 16:17:19 mha Exp $
*
*-------------------------------------------------------------------------
*/
@@ -2015,6 +2015,10 @@ freePGconn(PGconn *conn)
if (conn->krbsrvname)
free(conn->krbsrvname);
#endif
+#if defined(ENABLE_GSS) && defined(ENABLE_SSPI)
+ if (conn->gsslib)
+ free(conn->gsslib);
+#endif
/* Note that conn->Pfdebug is not ours to close or free */
if (conn->last_query)
free(conn->last_query);