summaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorTom Lane2003-12-18 22:49:26 +0000
committerTom Lane2003-12-18 22:49:26 +0000
commite0cd175212991c8fcd82d5fe3685f75de4bbaf0e (patch)
treec69b2f2c0a742db56273a36e5dadc27eaf05fa50 /src/interfaces
parent54840eca2ed26f9f5619553a69e46813a922bd24 (diff)
Fix memory leak with SSL connections due to missing X509_free() calls.
Per Neil Conway.
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/libpq/fe-secure.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/interfaces/libpq/fe-secure.c b/src/interfaces/libpq/fe-secure.c
index d31e9c3f772..34f94b0ad07 100644
--- a/src/interfaces/libpq/fe-secure.c
+++ b/src/interfaces/libpq/fe-secure.c
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.33 2003/11/29 19:52:12 pgsql Exp $
+ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.34 2003/12/18 22:49:26 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;
+ }
}
/*