diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2013-11-08 00:39:16 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2013-11-08 00:39:16 +0000 |
commit | a0a587ed9761afe84e76d56c1b94d9e03a89a22a (patch) | |
tree | 17997fcbcabaf22429a273e688e2e2b5009a34da /usr.bin/ssh/clientloop.c | |
parent | a43de758d80c580227b07a47b759441c1322b01c (diff) |
use calloc for all structure allocations; from markus@
Diffstat (limited to 'usr.bin/ssh/clientloop.c')
-rw-r--r-- | usr.bin/ssh/clientloop.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/ssh/clientloop.c b/usr.bin/ssh/clientloop.c index 9f6b53b3035..d938ac698a9 100644 --- a/usr.bin/ssh/clientloop.c +++ b/usr.bin/ssh/clientloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.254 2013/09/12 01:41:12 djm Exp $ */ +/* $OpenBSD: clientloop.c,v 1.255 2013/11/08 00:39:15 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -828,7 +828,7 @@ void client_expect_confirm(int id, const char *request, enum confirm_action action) { - struct channel_reply_ctx *cr = xmalloc(sizeof(*cr)); + struct channel_reply_ctx *cr = xcalloc(1, sizeof(*cr)); cr->request_type = request; cr->action = action; @@ -851,7 +851,7 @@ client_register_global_confirm(global_confirm_cb *cb, void *ctx) return; } - gc = xmalloc(sizeof(*gc)); + gc = xcalloc(1, sizeof(*gc)); gc->cb = cb; gc->ctx = ctx; gc->ref_count = 1; @@ -1426,7 +1426,7 @@ client_new_escape_filter_ctx(int escape_char) { struct escape_filter_ctx *ret; - ret = xmalloc(sizeof(*ret)); + ret = xcalloc(1, sizeof(*ret)); ret->escape_pending = 0; ret->escape_char = escape_char; return (void *)ret; |