Ver código fonte

convert to zalloc

tags/v0.9.3
Holger Lubitz 17 anos atrás
pai
commit
6d0332b5b3
1 arquivos alterados com 1 adições e 2 exclusões
  1. 1
    2
      src/core/downloader.c

+ 1
- 2
src/core/downloader.c Ver arquivo

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

Carregando…
Cancelar
Salvar