From: | Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Minor cleanup of backend SCRAM code. |
Date: | 2017-04-13 14:48:44 |
Message-ID: | E1cyg3A-0008FU-Cw@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Minor cleanup of backend SCRAM code.
Free each SASL message after sending it. It's not a lot of wasted memory,
and it's short-lived, but the authentication code in general tries to
pfree() stuff, so let's follow the example.
Adding the pfree() revealed a little bug in build_server_first_message().
It attempts to keeps a copy of the sent message, but it was missing a
pstrdup(), so the pointer started to dangle, after adding the pfree()
into CheckSCRAMAuth().
Reword comments and debug messages slightly, while we're at it.
Reviewed by Michael Paquier.
Discussion: https://www.postgresql.org/message-id/6490b975-5ee1-6280-ac1d-af975b19fb9a@iki.fi
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/00707fa58275e370dc445fa7e1130085aa04f37b
Modified Files
--------------
src/backend/libpq/auth-scram.c | 10 +++++-----
src/backend/libpq/auth.c | 12 +++++++-----
2 files changed, 12 insertions(+), 10 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2017-04-13 14:57:16 | pgsql: Catversion bump forgotten in previous commit |
Previous Message | Alvaro Herrera | 2017-04-13 14:39:26 | pgsql: Remove pg_stats_ext view |