Fix memory leak when using gsslib parameter in libpq connections
This commit is contained in:
parent
3690d7d5cf
commit
13a7d7f3cc
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.356 2008/01/29 02:06:30 tgl Exp $
|
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.356.2.1 2008/10/23 16:17:22 mha Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -1998,6 +1998,10 @@ freePGconn(PGconn *conn)
|
|||||||
#if defined(KRB5) || defined(ENABLE_GSS) || defined(ENABLE_SSPI)
|
#if defined(KRB5) || defined(ENABLE_GSS) || defined(ENABLE_SSPI)
|
||||||
if (conn->krbsrvname)
|
if (conn->krbsrvname)
|
||||||
free(conn->krbsrvname);
|
free(conn->krbsrvname);
|
||||||
|
#endif
|
||||||
|
#if defined(ENABLE_GSS) && defined(ENABLE_SSPI)
|
||||||
|
if (conn->gsslib)
|
||||||
|
free(conn->gsslib);
|
||||||
#endif
|
#endif
|
||||||
/* Note that conn->Pfdebug is not ours to close or free */
|
/* Note that conn->Pfdebug is not ours to close or free */
|
||||||
if (conn->last_query)
|
if (conn->last_query)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user