1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-26 23:43:30 +03:00

Back-patch 7.4-era fix for memory leak with SSL connections due to

missing X509_free() calls.  Per a request from a Red Hat customer;
seems silly for Red Hat to be shipping a patch that's not in upstream.
This commit is contained in:
Tom Lane
2006-06-23 14:42:52 +00:00
parent 9e63275633
commit fe090f0778
2 changed files with 17 additions and 2 deletions

View File

@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-secure.c,v 1.15.2.7 2003/08/22 21:57:44 tgl Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-secure.c,v 1.15.2.8 2006/06/23 14:42:52 tgl Exp $
*
* NOTES
* The client *requires* a valid server certificate. Since
@@ -897,6 +897,12 @@ close_SSL(PGconn *conn)
SSL_free(conn->ssl);
conn->ssl = NULL;
}
if (conn->peer)
{
X509_free(conn->peer);
conn->peer = NULL;
}
}
/*