mirror of
https://github.com/postgres/postgres.git
synced 2025-08-25 20:23:07 +03:00
Fix memory leak with SSL connections due to missing X509_free() calls.
Per Neil Conway.
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-secure.c,v 1.32 2003/09/29 16:38:04 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-secure.c,v 1.32.2.1 2003/12/18 22:49:34 tgl Exp $
|
||||
*
|
||||
* NOTES
|
||||
* The client *requires* a valid server certificate. Since
|
||||
@@ -1004,6 +1004,12 @@ close_SSL(PGconn *conn)
|
||||
SSL_free(conn->ssl);
|
||||
conn->ssl = NULL;
|
||||
}
|
||||
|
||||
if (conn->peer)
|
||||
{
|
||||
X509_free(conn->peer);
|
||||
conn->peer = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user