mirror of
https://github.com/xcat2/xNBA.git
synced 2024-12-14 15:21:32 +00:00
convert to zalloc
This commit is contained in:
parent
7fa85d19b9
commit
7872b890fe
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user