qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 4/5] vl.c: -object: handle duplicate 'id' properly


From: Igor Mammedov
Subject: [Qemu-devel] [PATCH 4/5] vl.c: -object: handle duplicate 'id' properly
Date: Wed, 8 Jan 2014 17:09:41 +0100

object_property_add_child() may fail if 'id' matches already
existing object. Which means incorrect command line,
so instead of silently ignoring error, report it and
go to error path (i.e. terminate QEMU).

Signed-off-by: Igor Mammedov <address@hidden>
---
 vl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/vl.c b/vl.c
index 1620393..84cb7a8 100644
--- a/vl.c
+++ b/vl.c
@@ -2821,7 +2821,7 @@ static int object_create(QemuOpts *opts, void *opaque)
     }
 
     object_property_add_child(container_get(object_get_root(), "/objects"),
-                              id, obj, NULL);
+                              id, obj, &local_err);
 
 out:
     object_unref(obj);
-- 
1.7.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]