On 9 March 2018 at 16:19, Kevin Wolf <kw...@redhat.com> wrote: > This adds the .bdrv_co_create driver callback to sheepdog, which enables > image creation over QMP. > > Signed-off-by: Kevin Wolf <kw...@redhat.com> > Reviewed-by: Max Reitz <mre...@redhat.com>
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