mirror of https://github.com/ipxe/ipxe.git
convert to zalloc
parent
aca232c973
commit
f77d9469a4
|
@ -215,10 +215,9 @@ int open ( const char *uri_string ) {
|
||||||
return fd;
|
return fd;
|
||||||
|
|
||||||
/* Allocate and initialise structure */
|
/* Allocate and initialise structure */
|
||||||
file = malloc ( sizeof ( *file ) );
|
file = zalloc ( sizeof ( *file ) );
|
||||||
if ( ! file )
|
if ( ! file )
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
memset ( file, 0, sizeof ( *file ) );
|
|
||||||
file->refcnt.free = posix_file_free;
|
file->refcnt.free = posix_file_free;
|
||||||
file->fd = fd;
|
file->fd = fd;
|
||||||
file->rc = -EINPROGRESS;
|
file->rc = -EINPROGRESS;
|
||||||
|
|
Loading…
Reference in New Issue