aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2017-04-21 10:50:37 +0200
committerAndreas Schneider <asn@cryptomilk.org>2017-04-21 10:50:37 +0200
commit79437fa0c9e88ebb0b52d0081ccd07545abf5a08 (patch)
treecabc0fbbf3e56a742b477614293d311cc009deb4
parent76ba2b0055e59728cc144319d4961406990d1d79 (diff)
downloadlibssh-79437fa0c9e88ebb0b52d0081ccd07545abf5a08.tar.gz
libssh-79437fa0c9e88ebb0b52d0081ccd07545abf5a08.tar.xz
libssh-79437fa0c9e88ebb0b52d0081ccd07545abf5a08.zip
auth: Use calloc in ssh_userauth_agent_pubkey()
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--src/auth.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/auth.c b/src/auth.c
index 43dd0d2b..8a686dc2 100644
--- a/src/auth.c
+++ b/src/auth.c
@@ -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;
}