summaryrefslogtreecommitdiffstats
path: root/qom
diff options
context:
space:
mode:
authorMarc-André Lureau2020-01-10 16:30:25 +0100
committerPaolo Bonzini2020-01-24 20:59:13 +0100
commit8770bafdc96727a7b87216221ec81c792b8b2857 (patch)
tree4794b6d859670a49394ebd8a830ba99a90d4d8b7 /qom
parentobject: do not free class properties (diff)
downloadqemu-8770bafdc96727a7b87216221ec81c792b8b2857.tar.gz
qemu-8770bafdc96727a7b87216221ec81c792b8b2857.tar.xz
qemu-8770bafdc96727a7b87216221ec81c792b8b2857.zip
object: check strong flag with &
The following patch is going to introduce more flags. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200110153039.1379601-13-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qom')
-rw-r--r--qom/object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qom/object.c b/qom/object.c
index 864281ecec..d7974e9844 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -1806,7 +1806,7 @@ static void object_set_link_property(Object *obj, Visitor *v,
}
*child = new_target;
- if (prop->flags == OBJ_PROP_LINK_STRONG) {
+ if (prop->flags & OBJ_PROP_LINK_STRONG) {
object_ref(new_target);
object_unref(old_target);
}