On 07/16/2012 01:24 AM, Paolo Bonzini wrote:
Il 15/07/2012 22:25, miny...@acm.org ha scritto:
From: Corey Minyard <cminy...@mvista.com>
When setting an object, if you don't release the previous object
that was there, it may become unusable. This change allows a
chardev to be removed from one object's properties and added to
another's.
---
qom/object.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/qom/object.c b/qom/object.c
index 00bb3b0..484dc77 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -731,6 +731,8 @@ void object_property_set(Object *obj, Visitor *v, const
char *name,
if (!prop->set) {
error_set(errp, QERR_PERMISSION_DENIED);
} else {
+ if (prop->release)
+ prop->release(obj, name, prop->opaque);
prop->set(obj, v, prop->opaque, name, errp);
}
}
Acked-by: Paolo Bonzini <pbonz...@redhat.com>
... but you need to run scripts/checkpatch.pl on your patches to conform
to coding style.
Ok. I'm running everything through the script. I didn't realize the
coding standard was that different from Linux.
Thanks,
-corey