summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/sftp-glob.c
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2013-11-08 00:39:16 +0000
committerDamien Miller <djm@cvs.openbsd.org>2013-11-08 00:39:16 +0000
commita0a587ed9761afe84e76d56c1b94d9e03a89a22a (patch)
tree17997fcbcabaf22429a273e688e2e2b5009a34da /usr.bin/ssh/sftp-glob.c
parenta43de758d80c580227b07a47b759441c1322b01c (diff)
use calloc for all structure allocations; from markus@
Diffstat (limited to 'usr.bin/ssh/sftp-glob.c')
-rw-r--r--usr.bin/ssh/sftp-glob.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/sftp-glob.c b/usr.bin/ssh/sftp-glob.c
index dfb370f33af..a2a59bbcca4 100644
--- a/usr.bin/ssh/sftp-glob.c
+++ b/usr.bin/ssh/sftp-glob.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-glob.c,v 1.24 2013/05/17 00:13:14 djm Exp $ */
+/* $OpenBSD: sftp-glob.c,v 1.25 2013/11/08 00:39:15 djm Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
*
@@ -45,7 +45,7 @@ fudge_opendir(const char *path)
{
struct SFTP_OPENDIR *r;
- r = xmalloc(sizeof(*r));
+ r = xcalloc(1, sizeof(*r));
if (do_readdir(cur.conn, (char *)path, &r->dir)) {
free(r);