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

Commit 501e58b

Browse files
committed
Fix memory leak when using gsslib parameter in libpq connections
1 parent 7028c13 commit 501e58b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/interfaces/libpq/fe-connect.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.362 2008/09/22 14:21:44 tgl Exp $
11+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.363 2008/10/23 16:17:19 mha Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -2014,6 +2014,10 @@ freePGconn(PGconn *conn)
20142014
#if defined(KRB5) || defined(ENABLE_GSS) || defined(ENABLE_SSPI)
20152015
if (conn->krbsrvname)
20162016
free(conn->krbsrvname);
2017+
#endif
2018+
#if defined(ENABLE_GSS) && defined(ENABLE_SSPI)
2019+
if (conn->gsslib)
2020+
free(conn->gsslib);
20172021
#endif
20182022
/* Note that conn->Pfdebug is not ours to close or free */
20192023
if (conn->last_query)

0 commit comments

Comments
 (0)