[Qemu-devel] [PATCH] qom: In function object_set_link_property(), first call object_ref(), then object_unref().

2012-02-22 Thread alexander_barabash
From: Alexander Barabash alexander_barab...@mentor.com In the old implementation, if the new value of the property links to the same object, as the old value, that object is first unref-ed, and then ref-ed. This leads to unintended deinitialization of that object. In the new implementation, this

[Qemu-devel] [PATCH] qom: In function object_set_link_property(), first call object_ref(), then object_unref().

2012-02-22 Thread alexander_barabash
From: Alexander Barabash alexander_barab...@mentor.com In the old implementation, if the new value of the property links to the same object, as the old value, that object is first unref-ed, and then ref-ed. This leads to unintended deinitialization of that object. In the new implementation, this

[Qemu-devel] [PATCH] qom: Make object_unref() free the object's memory when refcount goes to 0.

2012-02-22 Thread alexander_barabash
From: Alexander Barabash alexander_barab...@mentor.com In the existing implementation, object_delete() calls object_unref(), then frees the object's storage. Running object_delete() on an object with reference count different from 1 causes program failure. In the existing implementation,

[Qemu-devel] [PATCH] qom: Document ways to retrieve child object added by object_property_add_child()

2012-02-21 Thread alexander_barabash
From: Alexander Barabash alexander_barab...@mentor.com object_property_add_child() creates a property whose values as a string is the child object's canonical path. Signed-off-by: Alexander Barabash alexander_barab...@mentor.com --- include/qemu/object.h |4 1 files changed, 4