From: Holger Lubitz Date: Sun, 17 Jun 2007 23:25:13 +0000 (+0200) Subject: convert to zalloc X-Git-Tag: v0.9.3~264 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7fa85d19b95ac6d0cf423b26719419c0981d28df;p=thirdparty%2Fipxe.git convert to zalloc --- diff --git a/src/net/tcp/ftp.c b/src/net/tcp/ftp.c index b027d912a..9a9080857 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 );