From: Holger Lubitz Date: Sun, 17 Jun 2007 23:25:21 +0000 (+0200) Subject: convert to zalloc X-Git-Tag: v0.9.3~261 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da3c7858167b0f629f01820486f0f96e19673f7e;p=thirdparty%2Fipxe.git convert to zalloc --- diff --git a/src/net/udp/tftp.c b/src/net/udp/tftp.c index f42a96be5..4bbeb0f8b 100644 --- a/src/net/udp/tftp.c +++ b/src/net/udp/tftp.c @@ -635,10 +635,9 @@ int tftp_open ( struct xfer_interface *xfer, struct uri *uri ) { return -EINVAL; /* Allocate and populate TFTP structure */ - tftp = malloc ( sizeof ( *tftp ) ); + tftp = zalloc ( sizeof ( *tftp ) ); if ( ! tftp ) return -ENOMEM; - memset ( tftp, 0, sizeof ( *tftp ) ); tftp->refcnt.free = tftp_free; xfer_init ( &tftp->xfer, &tftp_xfer_operations, &tftp->refcnt ); tftp->uri = uri_get ( uri );