mirror of
https://github.com/xcat2/xNBA.git
synced 2024-12-14 07:11:32 +00:00
convert to zalloc
This commit is contained in:
parent
c7549bcebe
commit
6d0332b5b3
@ -261,10 +261,9 @@ int create_downloader ( struct job_interface *job, struct image *image,
|
||||
int rc;
|
||||
|
||||
/* Allocate and initialise structure */
|
||||
downloader = malloc ( sizeof ( *downloader ) );
|
||||
downloader = zalloc ( sizeof ( *downloader ) );
|
||||
if ( ! downloader )
|
||||
return -ENOMEM;
|
||||
memset ( downloader, 0, sizeof ( *downloader ) );
|
||||
downloader->refcnt.free = downloader_free;
|
||||
job_init ( &downloader->job, &downloader_job_operations,
|
||||
&downloader->refcnt );
|
||||
|
Loading…
Reference in New Issue
Block a user