Browse Source

convert to zalloc

tags/v0.9.3
Holger Lubitz 17 years ago
parent
commit
7fa85d19b9
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      src/net/tcp/ftp.c

+ 1
- 2
src/net/tcp/ftp.c View File

@@ -426,10 +426,9 @@ static int ftp_open ( struct xfer_interface *xfer, struct uri *uri ) {
426 426
 		return -EINVAL;
427 427
 
428 428
 	/* Allocate and populate structure */
429
-	ftp = malloc ( sizeof ( *ftp ) );
429
+	ftp = zalloc ( sizeof ( *ftp ) );
430 430
 	if ( ! ftp )
431 431
 		return -ENOMEM;
432
-	memset ( ftp, 0, sizeof ( *ftp ) );
433 432
 	ftp->refcnt.free = ftp_free;
434 433
 	xfer_init ( &ftp->xfer, &ftp_xfer_operations, &ftp->refcnt );
435 434
 	ftp->uri = uri_get ( uri );

Loading…
Cancel
Save