diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2017-10-06 20:49:16 -0300 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2017-10-12 15:56:06 -0500 |
commit | e8d3eb74bf11dff6920b8d0884c28f93e0d0d732 (patch) | |
tree | de4fe883795817a49d05bc4f6b6aa828eea742f8 /nbd | |
parent | f90ea7ba7c5ae7010ee0ce062207ae42530f57d6 (diff) | |
download | qemu-e8d3eb74bf11dff6920b8d0884c28f93e0d0d732.zip qemu-e8d3eb74bf11dff6920b8d0884c28f93e0d0d732.tar.gz qemu-e8d3eb74bf11dff6920b8d0884c28f93e0d0d732.tar.bz2 |
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>
Diffstat (limited to 'nbd')
-rw-r--r-- | nbd/server.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nbd/server.c b/nbd/server.c index 993ade3..b74cc6a 100644 --- a/nbd/server.c +++ b/nbd/server.c @@ -1047,7 +1047,7 @@ NBDExport *nbd_export_new(BlockDriverState *bs, off_t dev_offset, off_t size, { AioContext *ctx; BlockBackend *blk; - NBDExport *exp = g_malloc0(sizeof(NBDExport)); + NBDExport *exp = g_new0(NBDExport, 1); uint64_t perm; int ret; @@ -1539,7 +1539,7 @@ void nbd_client_new(NBDExport *exp, NBDClient *client; Coroutine *co; - client = g_malloc0(sizeof(NBDClient)); + client = g_new0(NBDClient, 1); client->refcount = 1; client->exp = exp; client->tlscreds = tlscreds; |