All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Hedde <damien.hedde@greensocs.com>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Cc: kwolf@redhat.com
Subject: Re: [PATCH] qdev-monitor: Fix use after free on duplicate device ID error
Date: Wed, 3 Nov 2021 10:25:44 +0100	[thread overview]
Message-ID: <2d491730-1da4-e502-3f68-90f0745fac9b@greensocs.com> (raw)
In-Reply-To: <20211103073848.1459138-1-armbru@redhat.com>


On 11/3/21 08:38, Markus Armbruster wrote:
> Fixes: 4a1d937796de0fecd8b22d7dbebf87f38e8282fd
> Reported-by: Coverity CID 1465223
> Signed-off-by: Markus Armbruster <armbru@redhat.com>

Reviewed-by: Damien Hedde <damien.hedde@greensocs.com>

Thanks,
Damien
> ---
>   softmmu/qdev-monitor.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/softmmu/qdev-monitor.c b/softmmu/qdev-monitor.c
> index e49d9773d2..14c1fb76c5 100644
> --- a/softmmu/qdev-monitor.c
> +++ b/softmmu/qdev-monitor.c
> @@ -592,8 +592,8 @@ const char *qdev_set_id(DeviceState *dev, char *id, Error **errp)
>           if (prop) {
>               dev->id = id;
>           } else {
> -            g_free(id);
>               error_setg(errp, "Duplicate device ID '%s'", id);
> +            g_free(id);
>               return NULL;
>           }
>       } else {
> 


  parent reply	other threads:[~2021-11-03  9:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-03  7:38 [PATCH] qdev-monitor: Fix use after free on duplicate device ID error Markus Armbruster
2021-11-03  7:42 ` Marc-André Lureau
2021-11-03  9:25 ` Damien Hedde [this message]
2021-11-03  9:33 ` Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2d491730-1da4-e502-3f68-90f0745fac9b@greensocs.com \
    --to=damien.hedde@greensocs.com \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.