qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: arei.gonglei@huawei.com, qemu-devel@nongnu.org
Cc: weidong.huang@huawei.com, aliguori@amazon.com, mst@redhat.com,
	armbru@redhat.com, luonengjun@huawei.com,
	peter.huangpeng@huawei.com, lcapitulino@redhat.com,
	stefanha@redhat.com, afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH v3 4/7] qom: add description field in ObjectProperty struct
Date: Mon, 29 Sep 2014 15:35:26 +0200	[thread overview]
Message-ID: <5429601E.3070207@redhat.com> (raw)
In-Reply-To: <1411794841-9672-5-git-send-email-arei.gonglei@huawei.com>

Il 27/09/2014 07:13, arei.gonglei@huawei.com ha scritto:
> +void object_property_set_description(Object *obj, const char *name,
> +                                     const char *description, Error **errp)
> +{
> +    ObjectProperty *op;
> +
> +    op = object_property_find(obj, name, errp);
> +    if (!op) {
> +        return;
> +    }

The old description is leaked here if it is not NULL.

Since you are doing v4, please move the object_property_add_alias change
here, too.

Paolo

> +    op->description = description ? g_strdup(description) : NULL;
> +}
> +

  reply	other threads:[~2014-09-29 13:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-27  5:13 [Qemu-devel] [PATCH v3 0/7] add description field in ObjectProperty and PropertyInfo struct arei.gonglei
2014-09-27  5:13 ` [Qemu-devel] [PATCH v3 1/7] qom: add error handler for object_property_print() arei.gonglei
2014-09-27  5:13 ` [Qemu-devel] [PATCH v3 2/7] qom: add error handler for object alias property arei.gonglei
2014-09-27  5:13 ` [Qemu-devel] [PATCH v3 3/7] qdev: add description field in PropertyInfo struct arei.gonglei
2014-09-27  5:13 ` [Qemu-devel] [PATCH v3 4/7] qom: add description field in ObjectProperty struct arei.gonglei
2014-09-29 13:35   ` Paolo Bonzini [this message]
2014-09-30  1:45     ` Gonglei (Arei)
2014-09-27  5:13 ` [Qemu-devel] [PATCH v3 5/7] qdev: set the object property's description to the qdev property's arei.gonglei
2014-09-27  5:14 ` [Qemu-devel] [PATCH v3 6/7] qmp: print descriptions of object properties arei.gonglei
2014-09-29 16:27   ` Eric Blake
2014-09-30  1:49     ` Gonglei (Arei)
2014-09-27  5:14 ` [Qemu-devel] [PATCH v3 7/7] qdev: drop legacy_name from qdev properties arei.gonglei
2014-09-29 15:15 ` [Qemu-devel] [PATCH v3 0/7] add description field in ObjectProperty and PropertyInfo struct Andreas Färber
2014-09-30  0:58   ` Gonglei (Arei)

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=5429601E.3070207@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=afaerber@suse.de \
    --cc=aliguori@amazon.com \
    --cc=arei.gonglei@huawei.com \
    --cc=armbru@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=luonengjun@huawei.com \
    --cc=mst@redhat.com \
    --cc=peter.huangpeng@huawei.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=weidong.huang@huawei.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).