From: Paolo Bonzini <pbonzini@redhat.com>
To: Liviu Ionescu <ilg@livius.net>, QEMU Developers <Qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] String properties defaults must be dynamically allocated
Date: Wed, 17 Jun 2015 15:16:26 +0200 [thread overview]
Message-ID: <5581732A.9080901@redhat.com> (raw)
In-Reply-To: <A06F9373-9B39-455A-9283-6E7610929B72@livius.net>
On 17/06/2015 13:38, Liviu Ionescu wrote:
> I don't know if this is a bug or a feature (to me it looks like a
> bug), but if the string pointer associated with a string property is
> initialised during inits with a pointer to a static string, the next
> qdev_prop_set_string() will fail attempting to free the static
> object.
>
> the workaround is to g_strdup() the default static string.
It's neither a bug nor a feature. You can just use
qdev_prop_set_string() itself to initialize the property.
Paolo
prev parent reply other threads:[~2015-06-17 13:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-17 11:38 [Qemu-devel] String properties defaults must be dynamically allocated Liviu Ionescu
2015-06-17 13:16 ` Paolo Bonzini [this message]
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=5581732A.9080901@redhat.com \
--to=pbonzini@redhat.com \
--cc=Qemu-devel@nongnu.org \
--cc=ilg@livius.net \
/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.