projects
/
pgpool2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
33f17e7
)
Fix for Coverity warnings in pool_auth
author
Muhammad Usama
<m.usama@gmail.com>
Thu, 3 Oct 2019 15:33:22 +0000
(20:33 +0500)
committer
Muhammad Usama
<m.usama@gmail.com>
Thu, 3 Oct 2019 15:33:22 +0000
(20:33 +0500)
src/auth/auth-scram.c
patch
|
blob
|
blame
|
history
diff --git
a/src/auth/auth-scram.c
b/src/auth/auth-scram.c
index 953c341386d465b7232db3fa3db32cddfc6ec9b3..3b0b3cd6b429bcb30e042cd46ef54a9e920af063 100644
(file)
--- a/
src/auth/auth-scram.c
+++ b/
src/auth/auth-scram.c
@@
-502,6
+502,9
@@
scram_verify_plain_password(const char *username, const char *password,
{
ereport(LOG,
(errmsg("invalid SCRAM verifier for user \"%s\"", username)));
+
+ pfree(encoded_salt);
+ pfree(salt);
return false;
}
@@
-514,6
+517,7
@@
scram_verify_plain_password(const char *username, const char *password,
* user-supplied password.
*/
pfree(encoded_salt);
+ pfree(salt);
return memcmp(computed_key, server_key, SCRAM_KEY_LEN) == 0;
}
@@
-592,6
+596,8
@@
parse_scram_verifier(const char *verifier, int *iterations, char **salt,
if (decoded_len != SCRAM_KEY_LEN)
goto invalid_verifier;
+ pfree(v);
+
return true;
invalid_verifier: