From 7872b890fe0aa8d741a464018bb9e24354355eab Mon Sep 17 00:00:00 2001 From: Holger Lubitz Date: Mon, 18 Jun 2007 01:25:15 +0200 Subject: [PATCH] convert to zalloc --- src/net/tcp/http.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/net/tcp/http.c b/src/net/tcp/http.c index f81a9b54..4a979eae 100644 --- a/src/net/tcp/http.c +++ b/src/net/tcp/http.c @@ -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 );