Commit e4db972e authored by Michael Paquier's avatar Michael Paquier

Use explicit_bzero() when clearing sslpassword in libpq

Since 74a308cf, any security-sensitive information gets cleared from
memory this way.  This was forgotten in 4dc63552.

Author: Daniel Gustafsson
Reviewed-by: Peter Eisentraut, Michael Paquier
Discussion: https://postgr.es/m/935443BA-D42E-4CE0-B181-1AD79E6DD45A@yesql.se
parent d2a99599
......@@ -4037,7 +4037,10 @@ freePGconn(PGconn *conn)
if (conn->sslkey)
free(conn->sslkey);
if (conn->sslpassword)
{
explicit_bzero(conn->sslpassword, strlen(conn->sslpassword));
free(conn->sslpassword);
}
if (conn->sslrootcert)
free(conn->sslrootcert);
if (conn->sslcrl)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment