[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL 37/40] machine: add smp compound property
From: |
Peter Maydell |
Subject: |
Re: [PULL 37/40] machine: add smp compound property |
Date: |
Tue, 13 Jul 2021 11:37:27 +0100 |
On Tue, 6 Jul 2021 at 11:39, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> Make -smp syntactic sugar for a compound property "-machine
> smp.{cores,threads,cpu,...}". machine_smp_parse is replaced by the
> setter for the property.
>
> numa-test will now cover the new syntax, while other tests
> still use -smp.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Hi; Coverity reports a leak in this code (CID 1458085):
> +static void
> +machine_parse_property_opt(QemuOptsList *opts_list, const char *propname,
> + const char *arg, Error **errp)
> +{
> + QDict *opts, *prop;
> + bool help = false;
> + ERRP_GUARD();
> +
> + prop = keyval_parse(arg, opts_list->implied_opt_name, &help, errp);
> + if (help) {
> + qemu_opts_print_help(opts_list, true);
> + return;
In this return path we don't unref 'prop'.
> + }
> + opts = qdict_new();
> + qdict_put(opts, propname, prop);
> + keyval_merge(machine_opts_dict, opts, errp);
> + qobject_unref(opts);
> +}
thanks
-- PMM
- [PULL 35/40] keyval: introduce keyval_parse_into, (continued)
- [PULL 38/40] qemu-option: remove now-dead code, Paolo Bonzini, 2021/07/06
- [PULL 37/40] machine: add smp compound property, Paolo Bonzini, 2021/07/06
- [PULL 32/40] configure: convert compiler tests to meson, part 6, Paolo Bonzini, 2021/07/06
- [PULL 39/40] Set icon for QEMU binary on Mac OS, Paolo Bonzini, 2021/07/06
- Re: [PULL 00/40] Misc patches for 2021-07-06, Peter Maydell, 2021/07/06