From 7fa85d19b95ac6d0cf423b26719419c0981d28df Mon Sep 17 00:00:00 2001 From: Holger Lubitz Date: Mon, 18 Jun 2007 01:25:13 +0200 Subject: [PATCH] convert to zalloc --- src/net/tcp/ftp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/net/tcp/ftp.c b/src/net/tcp/ftp.c index b027d912..9a908085 100644 --- a/src/net/tcp/ftp.c +++ b/src/net/tcp/ftp.c @@ -426,10 +426,9 @@ static int ftp_open ( struct xfer_interface *xfer, struct uri *uri ) { return -EINVAL; /* Allocate and populate structure */ - ftp = malloc ( sizeof ( *ftp ) ); + ftp = zalloc ( sizeof ( *ftp ) ); if ( ! ftp ) return -ENOMEM; - memset ( ftp, 0, sizeof ( *ftp ) ); ftp->refcnt.free = ftp_free; xfer_init ( &ftp->xfer, &ftp_xfer_operations, &ftp->refcnt ); ftp->uri = uri_get ( uri );