summaryrefslogtreecommitdiffstats
path: root/src/net/udp/tftp.c
diff options
context:
space:
mode:
authorHolger Lubitz2007-06-18 01:25:21 +0200
committerHolger Lubitz2007-07-06 20:52:58 +0200
commitda3c7858167b0f629f01820486f0f96e19673f7e (patch)
tree5b75729d47fd6e70a8be7b7689cdbb63ad5ea98e /src/net/udp/tftp.c
parentconvert to zalloc (diff)
downloadipxe-da3c7858167b0f629f01820486f0f96e19673f7e.tar.gz
ipxe-da3c7858167b0f629f01820486f0f96e19673f7e.tar.xz
ipxe-da3c7858167b0f629f01820486f0f96e19673f7e.zip
convert to zalloc
Diffstat (limited to 'src/net/udp/tftp.c')
-rw-r--r--src/net/udp/tftp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/net/udp/tftp.c b/src/net/udp/tftp.c
index f42a96be..4bbeb0f8 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 );