diff --git a/src/core/posix_io.c b/src/core/posix_io.c index f4ae1c13..ca29ea69 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;