summaryrefslogtreecommitdiff
path: root/lib/util/xfile.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-10-11 22:23:07 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-11 22:23:07 +0200
commitbb33097fb79021c1a47bb4bc45c132020c47d6e4 (patch)
tree8295f619e9721d36fafdf4e4470a559ab6d4ba85 /lib/util/xfile.c
parent06cdfb17b92e69de2995dd7c4a3f417f10230aa7 (diff)
downloadsamba-bb33097fb79021c1a47bb4bc45c132020c47d6e4.tar.gz
samba-bb33097fb79021c1a47bb4bc45c132020c47d6e4.tar.bz2
samba-bb33097fb79021c1a47bb4bc45c132020c47d6e4.zip
Make sure x_fdup compiles on Samba 4.
Diffstat (limited to 'lib/util/xfile.c')
-rw-r--r--lib/util/xfile.c3
1 files changed, 2 insertions, 1 deletions
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;