summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/net/tcp/http.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/net/tcp/http.c b/src/net/tcp/http.c
index f81a9b540..4a979eae2 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 );