From 6d0332b5b34e64dc94972befa9031dbb6bf905b8 Mon Sep 17 00:00:00 2001 From: Holger Lubitz Date: Mon, 18 Jun 2007 01:24:41 +0200 Subject: [PATCH] convert to zalloc --- src/core/downloader.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/downloader.c b/src/core/downloader.c index 40003db0..d2237443 100644 --- a/src/core/downloader.c +++ b/src/core/downloader.c @@ -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 );