diff options
author | Damien Miller <djm@mindrot.org> | 2019-09-13 13:14:39 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-09-13 13:15:19 +1000 |
commit | ec0e6243660bf2df30c620a6a0d83eded376c9c6 (patch) | |
tree | 256c41488c1e0471386bc3a272b243f400243f3c /auth-pam.c | |
parent | c17e4638e5592688264fc0349f61bfc7b4425aa5 (diff) |
memleak of buffer in sshpam_query
coverity report via Ed Maste; ok dtucker@
Diffstat (limited to 'auth-pam.c')
-rw-r--r-- | auth-pam.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -851,6 +851,7 @@ sshpam_query(void *ctx, char **name, char **info, plen += mlen; **echo_on = (type == PAM_PROMPT_ECHO_ON); free(msg); + sshbuf_free(buffer); return (0); case PAM_ERROR_MSG: case PAM_TEXT_INFO: @@ -879,6 +880,7 @@ sshpam_query(void *ctx, char **name, char **info, **echo_on = 0; ctxt->pam_done = -1; free(msg); + sshbuf_free(buffer); return 0; } /* FALLTHROUGH */ @@ -905,6 +907,7 @@ sshpam_query(void *ctx, char **name, char **info, **echo_on = 0; ctxt->pam_done = 1; free(msg); + sshbuf_free(buffer); return (0); } error("PAM: %s for %s%.100s from %.100s", msg, @@ -916,9 +919,11 @@ sshpam_query(void *ctx, char **name, char **info, **echo_on = 0; free(msg); ctxt->pam_done = -1; + sshbuf_free(buffer); return (-1); } } + sshbuf_free(buffer); return (-1); } |