1
1

bind: Use calloc instead of malloc

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Этот коммит содержится в:
Anderson Toshiyuki Sasaki 2019-03-06 11:38:33 +01:00 коммит произвёл Andreas Schneider
родитель 0bde6b142c
Коммит 19e886d6b1

Просмотреть файл

@ -132,11 +132,10 @@ static socket_t bind_socket(ssh_bind sshbind, const char *hostname,
ssh_bind ssh_bind_new(void) {
ssh_bind ptr;
ptr = malloc(sizeof(struct ssh_bind_struct));
ptr = calloc(1, sizeof(struct ssh_bind_struct));
if (ptr == NULL) {
return NULL;
}
ZERO_STRUCTP(ptr);
ptr->bindfd = SSH_INVALID_SOCKET;
ptr->bindport= 22;
ptr->common.log_verbosity = 0;