diff options
author | Shchelkunov Artem <a.shchelkunov@ideco.ru> | 2021-08-11 18:07:58 +0500 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2021-09-03 13:42:08 +1000 |
commit | 1ff38f34b4c4545eb28106629cafa1e0496bc726 (patch) | |
tree | 04565ea5deb889a79e0578226c43ef33cf3cdab7 | |
parent | cb37e2f0c0ca4fef844ed7edc5d0e3b7d0e83f6a (diff) |
Fix memory leak in error path.
*info is allocated via xstrdup but was leaked in the PAM_AUTH_ERR path.
From github PR#266.
-rw-r--r-- | auth-pam.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -886,6 +886,7 @@ sshpam_query(void *ctx, char **name, char **info, case PAM_AUTH_ERR: debug3("PAM: %s", pam_strerror(sshpam_handle, type)); if (**prompts != NULL && strlen(**prompts) != 0) { + free(*info); *info = **prompts; **prompts = NULL; *num = 0; |