mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-29 01:03:57 +03:00
auth: Use calloc in ssh_userauth_agent_pubkey()
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -1222,11 +1222,10 @@ int ssh_userauth_agent_pubkey(ssh_session session,
|
||||
ssh_kbdint ssh_kbdint_new(void) {
|
||||
ssh_kbdint kbd;
|
||||
|
||||
kbd = malloc(sizeof(struct ssh_kbdint_struct));
|
||||
kbd = calloc(1, sizeof(struct ssh_kbdint_struct));
|
||||
if (kbd == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
ZERO_STRUCTP(kbd);
|
||||
|
||||
return kbd;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user