mirror of
https://github.com/xcat2/xNBA.git
synced 2024-12-14 23:31:39 +00:00
convert to zalloc
This commit is contained in:
parent
aca232c973
commit
f77d9469a4
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user