[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] qemu_opt_get_bool_helper: Fix option handling
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] qemu_opt_get_bool_helper: Fix option handling |
Date: |
Thu, 08 Jan 2015 18:14:51 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 |
On 08/01/2015 17:09, Michal Privoznik wrote:
> diff --git a/util/qemu-option.c b/util/qemu-option.c
> index a708241..478420f 100644
> --- a/util/qemu-option.c
> +++ b/util/qemu-option.c
> @@ -384,7 +384,6 @@ static bool qemu_opt_get_bool_helper(QemuOpts *opts,
> const char *name,
> }
> return ret;
> }
> - assert(opt->desc && opt->desc->type == QEMU_OPT_BOOL);
> ret = opt->value.boolean;
> if (del) {
> qemu_opt_del_all(opts, name);
>
opt->value.boolean is not initialized correctly if opt->desc is NULL.
See how it is assigned in qemu_opt_parse.
Paolo