From bb33097fb79021c1a47bb4bc45c132020c47d6e4 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 11 Oct 2008 22:23:07 +0200 Subject: Make sure x_fdup compiles on Samba 4. --- lib/util/xfile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/util/xfile.c') diff --git a/lib/util/xfile.c b/lib/util/xfile.c index b758b1fa9f..7cfb68018e 100644 --- a/lib/util/xfile.c +++ b/lib/util/xfile.c @@ -405,11 +405,12 @@ XFILE *x_fdup(const XFILE *f) return NULL; } - ret = SMB_CALLOC_ARRAY(XFILE, 1); + ret = malloc_p(XFILE); if (!ret) { close(fd); return NULL; } + memset(ret, 0, sizeof(XFILE)); ret->fd = fd; ret->open_flags = f->open_flags; -- cgit