aboutsummaryrefslogtreecommitdiff
path: root/block/gluster.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-08-22 16:12:51 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-08-22 16:12:51 +0100
commit33886ebeec0c0ff6253a49253fae0db44c9ed0f3 (patch)
tree1e666965b66772c0d5e64beb98a7585c08936fd8 /block/gluster.c
parent43fe62757b0b90af448e02c9bd55b62960556360 (diff)
parentbd39e6ed0b88a1473c652c97e731a156cccf16e2 (diff)
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block patches # gpg: Signature made Fri 22 Aug 2014 14:47:53 BST using RSA key ID C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" * remotes/kevin/tags/for-upstream: (29 commits) qemu-img: Allow cache mode specification for amend qemu-img: Allow source cache mode specification vmdk: Use bdrv_nb_sectors() where sectors, not bytes are wanted blkdebug: Delete BH in bdrv_aio_cancel qemu-iotests: add test case 101 for short file I/O raw-posix: fix O_DIRECT short reads block/iscsi: fix memory corruption on iscsi resize block/vvfat.c: remove debugging code to reinit stderr if NULL iotests: Add test for image filename construction quorum: Implement bdrv_refresh_filename() nbd: Implement bdrv_refresh_filename() blkverify: Implement bdrv_refresh_filename() blkdebug: Implement bdrv_refresh_filename() block: Add bdrv_refresh_filename() virtio-blk: fix reference a pointer which might be freed virtio-blk: allow block_resize with dataplane block: acquire AioContext in qmp_block_resize() qemu-iotests: Fix 028 reference output for qed test-coroutine: test cost introduced by coroutine iotests: Add test for qcow2's cache options ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'block/gluster.c')
-rw-r--r--block/gluster.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/block/gluster.c b/block/gluster.c
index 9274dead7d..1912cf9d07 100644
--- a/block/gluster.c
+++ b/block/gluster.c
@@ -291,7 +291,7 @@ static int qemu_gluster_open(BlockDriverState *bs, QDict *options,
BDRVGlusterState *s = bs->opaque;
int open_flags = 0;
int ret = 0;
- GlusterConf *gconf = g_malloc0(sizeof(GlusterConf));
+ GlusterConf *gconf = g_new0(GlusterConf, 1);
QemuOpts *opts;
Error *local_err = NULL;
const char *filename;
@@ -351,12 +351,12 @@ static int qemu_gluster_reopen_prepare(BDRVReopenState *state,
assert(state != NULL);
assert(state->bs != NULL);
- state->opaque = g_malloc0(sizeof(BDRVGlusterReopenState));
+ state->opaque = g_new0(BDRVGlusterReopenState, 1);
reop_s = state->opaque;
qemu_gluster_parse_flags(state->flags, &open_flags);
- gconf = g_malloc0(sizeof(GlusterConf));
+ gconf = g_new0(GlusterConf, 1);
reop_s->glfs = qemu_gluster_init(gconf, state->bs->filename, errp);
if (reop_s->glfs == NULL) {
@@ -486,7 +486,7 @@ static int qemu_gluster_create(const char *filename,
int prealloc = 0;
int64_t total_size = 0;
char *tmp = NULL;
- GlusterConf *gconf = g_malloc0(sizeof(GlusterConf));
+ GlusterConf *gconf = g_new0(GlusterConf, 1);
glfs = qemu_gluster_init(gconf, filename, errp);
if (!glfs) {