summaryrefslogtreecommitdiff
path: root/clientloop.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2013-11-08 12:19:55 +1100
committerDamien Miller <djm@mindrot.org>2013-11-08 12:19:55 +1100
commit6c81fee693038de7d4a5559043350391db2a2761 (patch)
treee09e17a18e8556e3b2276b280fa2cd2f2c465f90 /clientloop.c
parent690d989008e18af3603a5e03f1276c9bad090370 (diff)
- djm@cvs.openbsd.org 2013/11/08 00:39:15
[auth-options.c auth2-chall.c authfd.c channels.c cipher-3des1.c] [clientloop.c gss-genr.c monitor_mm.c packet.c schnorr.c umac.c] [sftp-client.c sftp-glob.c] use calloc for all structure allocations; from markus@
Diffstat (limited to 'clientloop.c')
-rw-r--r--clientloop.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/clientloop.c b/clientloop.c
index 45a55e0ec..8ad5d06b0 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: clientloop.c,v 1.254 2013/09/12 01:41:12 djm Exp $ */ 1/* $OpenBSD: clientloop.c,v 1.255 2013/11/08 00:39:15 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -837,7 +837,7 @@ void
837client_expect_confirm(int id, const char *request, 837client_expect_confirm(int id, const char *request,
838 enum confirm_action action) 838 enum confirm_action action)
839{ 839{
840 struct channel_reply_ctx *cr = xmalloc(sizeof(*cr)); 840 struct channel_reply_ctx *cr = xcalloc(1, sizeof(*cr));
841 841
842 cr->request_type = request; 842 cr->request_type = request;
843 cr->action = action; 843 cr->action = action;
@@ -860,7 +860,7 @@ client_register_global_confirm(global_confirm_cb *cb, void *ctx)
860 return; 860 return;
861 } 861 }
862 862
863 gc = xmalloc(sizeof(*gc)); 863 gc = xcalloc(1, sizeof(*gc));
864 gc->cb = cb; 864 gc->cb = cb;
865 gc->ctx = ctx; 865 gc->ctx = ctx;
866 gc->ref_count = 1; 866 gc->ref_count = 1;
@@ -1438,7 +1438,7 @@ client_new_escape_filter_ctx(int escape_char)
1438{ 1438{
1439 struct escape_filter_ctx *ret; 1439 struct escape_filter_ctx *ret;
1440 1440
1441 ret = xmalloc(sizeof(*ret)); 1441 ret = xcalloc(1, sizeof(*ret));
1442 ret->escape_pending = 0; 1442 ret->escape_pending = 0;
1443 ret->escape_char = escape_char; 1443 ret->escape_char = escape_char;
1444 return (void *)ret; 1444 return (void *)ret;