|
@@ -261,10 +261,9 @@ int create_downloader ( struct job_interface *job, struct image *image,
|
261
|
261
|
int rc;
|
262
|
262
|
|
263
|
263
|
/* Allocate and initialise structure */
|
264
|
|
- downloader = malloc ( sizeof ( *downloader ) );
|
|
264
|
+ downloader = zalloc ( sizeof ( *downloader ) );
|
265
|
265
|
if ( ! downloader )
|
266
|
266
|
return -ENOMEM;
|
267
|
|
- memset ( downloader, 0, sizeof ( *downloader ) );
|
268
|
267
|
downloader->refcnt.free = downloader_free;
|
269
|
268
|
job_init ( &downloader->job, &downloader_job_operations,
|
270
|
269
|
&downloader->refcnt );
|