[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PULL 43/56] sheepdog: Support .bdrv_co_cr
From: |
Peter Maydell |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PULL 43/56] sheepdog: Support .bdrv_co_create |
Date: |
Fri, 27 Apr 2018 15:05:10 +0100 |
On 9 March 2018 at 16:19, Kevin Wolf <address@hidden> wrote:
> This adds the .bdrv_co_create driver callback to sheepdog, which enables
> image creation over QMP.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> Reviewed-by: Max Reitz <address@hidden>
Hi; Coverity (CID 1390614) thinks there's a resource leak in this function:
> +static int coroutine_fn sd_co_create_opts(const char *filename, QemuOpts
> *opts,
> + Error **errp)
> +{
> + BlockdevCreateOptions *create_options = NULL;
> + QDict *qdict, *location_qdict;
> + QObject *crumpled;
> + Visitor *v;
> + const char *redundancy;
> + Error *local_err = NULL;
> + int ret;
> +
> + redundancy = qemu_opt_get_del(opts, BLOCK_OPT_REDUNDANCY);
qemu_opt_get_del() returns either NULL or memory which
the caller must free with g_free()...
> + ret = sd_co_create(create_options, errp);
> +fail:
> + qapi_free_BlockdevCreateOptions(create_options);
> + QDECREF(qdict);
> + return ret;
...but the exit path from this function doesn't free it.
> +}
thanks
-- PMM
- Re: [Qemu-block] [Qemu-devel] [PULL 43/56] sheepdog: Support .bdrv_co_create,
Peter Maydell <=