summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/posix_io.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/posix_io.c b/src/core/posix_io.c
index f4ae1c137..ca29ea697 100644
--- a/src/core/posix_io.c
+++ b/src/core/posix_io.c
@@ -215,10 +215,9 @@ int open ( const char *uri_string ) {
return fd;
/* Allocate and initialise structure */
- file = malloc ( sizeof ( *file ) );
+ file = zalloc ( sizeof ( *file ) );
if ( ! file )
return -ENOMEM;
- memset ( file, 0, sizeof ( *file ) );
file->refcnt.free = posix_file_free;
file->fd = fd;
file->rc = -EINPROGRESS;