Browse Source

convert to zalloc

tags/v0.9.3
Holger Lubitz 17 years ago
parent
commit
6d0332b5b3
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      src/core/downloader.c

+ 1
- 2
src/core/downloader.c View File

@@ -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 );

Loading…
Cancel
Save