Browse Source

convert to zalloc

tags/v0.9.3
Holger Lubitz 17 years ago
parent
commit
da3c785816
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      src/net/udp/tftp.c

+ 1
- 2
src/net/udp/tftp.c View File

@@ -635,10 +635,9 @@ int tftp_open ( struct xfer_interface *xfer, struct uri *uri ) {
635 635
 		return -EINVAL;
636 636
 
637 637
 	/* Allocate and populate TFTP structure */
638
-	tftp = malloc ( sizeof ( *tftp ) );
638
+	tftp = zalloc ( sizeof ( *tftp ) );
639 639
 	if ( ! tftp )
640 640
 		return -ENOMEM;
641
-	memset ( tftp, 0, sizeof ( *tftp ) );
642 641
 	tftp->refcnt.free = tftp_free;
643 642
 	xfer_init ( &tftp->xfer, &tftp_xfer_operations, &tftp->refcnt );
644 643
 	tftp->uri = uri_get ( uri );

Loading…
Cancel
Save