NBD: use g_new() family of functions
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20171006235023.11952-22-f4bug@amsat.org> Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
f90ea7ba7c
commit
e8d3eb74bf
|
@ -1047,7 +1047,7 @@ NBDExport *nbd_export_new(BlockDriverState *bs, off_t dev_offset, off_t size,
|
||||||
{
|
{
|
||||||
AioContext *ctx;
|
AioContext *ctx;
|
||||||
BlockBackend *blk;
|
BlockBackend *blk;
|
||||||
NBDExport *exp = g_malloc0(sizeof(NBDExport));
|
NBDExport *exp = g_new0(NBDExport, 1);
|
||||||
uint64_t perm;
|
uint64_t perm;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
@ -1539,7 +1539,7 @@ void nbd_client_new(NBDExport *exp,
|
||||||
NBDClient *client;
|
NBDClient *client;
|
||||||
Coroutine *co;
|
Coroutine *co;
|
||||||
|
|
||||||
client = g_malloc0(sizeof(NBDClient));
|
client = g_new0(NBDClient, 1);
|
||||||
client->refcount = 1;
|
client->refcount = 1;
|
||||||
client->exp = exp;
|
client->exp = exp;
|
||||||
client->tlscreds = tlscreds;
|
client->tlscreds = tlscreds;
|
||||||
|
|
Loading…
Reference in New Issue