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
 	int rc;
261
 	int rc;
262
 
262
 
263
 	/* Allocate and initialise structure */
263
 	/* Allocate and initialise structure */
264
-	downloader = malloc ( sizeof ( *downloader ) );
264
+	downloader = zalloc ( sizeof ( *downloader ) );
265
 	if ( ! downloader )
265
 	if ( ! downloader )
266
 		return -ENOMEM;
266
 		return -ENOMEM;
267
-	memset ( downloader, 0, sizeof ( *downloader ) );
268
 	downloader->refcnt.free = downloader_free;
267
 	downloader->refcnt.free = downloader_free;
269
 	job_init ( &downloader->job, &downloader_job_operations,
268
 	job_init ( &downloader->job, &downloader_job_operations,
270
 		   &downloader->refcnt );
269
 		   &downloader->refcnt );

Loading…
Cancel
Save