aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2016-11-11 12:51:50 +0000
committerStefan Hajnoczi <stefanha@redhat.com>2016-11-11 12:51:50 +0000
commit83c83f9a5266ff113060f887f106a47920fa6974 (patch)
treee25f16e32d59b52f04206f2ea5037854417d06dd /hw
parent6bbcb76301a72dc80c8d29af13d40bb9a759c9c6 (diff)
parenta5068244b4f0c994791303b6186b6f732adab6c2 (diff)
Merge remote-tracking branch 'bonzini/tags/for-upstream' into staging
Small fixes for hard freeze. # gpg: Signature made Thu 10 Nov 2016 03:34:24 PM GMT # gpg: using RSA key 0xBFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * bonzini/tags/for-upstream: nbd: Don't inf-loop on early EOF target-i386: document how x86 gdb_num_core_regs is computed. qdev: fix use-after-free regression from becdfa00cfa target-i386/machine: fix migrate faile because of Hyper-V HV_X64_MSR_VP_RUNTIME vl.c: move pidfile creation up the line target-i386: fix typo Message-id: 1478800362-18138-1-git-send-email-pbonzini@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/core/qdev-properties-system.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c
index c35f0f59d6..1b7ea50e9f 100644
--- a/hw/core/qdev-properties-system.c
+++ b/hw/core/qdev-properties-system.c
@@ -200,18 +200,14 @@ static void set_chr(Object *obj, Visitor *v, const char *name, void *opaque,
}
s = qemu_chr_find(str);
- g_free(str);
if (s == NULL) {
error_setg(errp, "Property '%s.%s' can't find value '%s'",
object_get_typename(obj), prop->name, str);
- return;
- }
-
- if (!qemu_chr_fe_init(be, s, errp)) {
+ } else if (!qemu_chr_fe_init(be, s, errp)) {
error_prepend(errp, "Property '%s.%s' can't take value '%s': ",
object_get_typename(obj), prop->name, str);
- return;
}
+ g_free(str);
}
static void release_chr(Object *obj, const char *name, void *opaque)