mirror of
https://github.com/gravitational/teleport.git
synced 2026-09-24 16:17:11 +08:00
pam: free conversation buffer on error (#30466)
As per pam_conv(3): > On failure, the conversation function should release any resources > it has allocated, and return one of the predefined PAM error codes. Fixes gravitational/teleport-private#661
This commit is contained in:
@@ -111,6 +111,7 @@ int converse(int n, const struct pam_message **msg, struct pam_response **resp,
|
||||
}
|
||||
}
|
||||
memset(aresp, 0, n * sizeof *aresp);
|
||||
free(aresp);
|
||||
*resp = NULL;
|
||||
return PAM_CONV_ERR;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user