diff options
author | Damien Miller <djm@mindrot.org> | 2013-11-08 12:28:03 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2013-11-08 12:28:03 +1100 |
commit | 727a3bfd3b5943bef9a9fd02812e9a75758d6d26 (patch) | |
tree | c9465c196ba7c575797626192d06e35a787a5c7d /clientloop.c | |
parent | 13cfd6d68237ef844dd8e02cf9ed21268154a999 (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.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clientloop.c b/clientloop.c index 7c1f8abba..23c2f2396 100644 --- a/clientloop.c +++ b/clientloop.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: clientloop.c,v 1.253 2013/06/07 15:37:52 dtucker 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 | |||
837 | client_expect_confirm(int id, const char *request, | 837 | client_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; |