]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
convert to zalloc
authorHolger Lubitz <hal@duncan.ol.sub.de>
Sun, 17 Jun 2007 23:25:15 +0000 (01:25 +0200)
committerHolger Lubitz <hal@duncan.ol.sub.de>
Fri, 6 Jul 2007 18:50:32 +0000 (20:50 +0200)
src/net/tcp/http.c

index f81a9b540a0ac093976d78a90512ba0279437835..4a979eae22b23dba8e1f7814b939c08b853b2040 100644 (file)
@@ -475,10 +475,9 @@ int http_open ( struct xfer_interface *xfer, struct uri *uri ) {
                return -EINVAL;
 
        /* Allocate and populate HTTP structure */
-       http = malloc ( sizeof ( *http ) );
+       http = zalloc ( sizeof ( *http ) );
        if ( ! http )
                return -ENOMEM;
-       memset ( http, 0, sizeof ( *http ) );
        http->refcnt.free = http_free;
        xfer_init ( &http->xfer, &http_xfer_operations, &http->refcnt );
                http->uri = uri_get ( uri );