diff mbox series

[PULL,41/59] object: do not free class properties

Message ID 1579787342-27146-42-git-send-email-pbonzini@redhat.com (mailing list archive)
State New, archived
Headers show
Series [PULL,01/59] cpu: Introduce cpu_class_set_parent_reset() | expand

Commit Message

Paolo Bonzini Jan. 23, 2020, 1:48 p.m. UTC
From: Marc-André Lureau <marcandre.lureau@redhat.com>

The release callback is called during object_property_del_all(), on a
live instance. But class properties are common among all
instances. It is not currently called, because we don't release
classes, but it would not be correct if we did.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20200110153039.1379601-12-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 qom/object.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/qom/object.c b/qom/object.c
index 1423344..30c4f82 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -2143,7 +2143,7 @@  object_class_property_add_str(ObjectClass *klass, const char *name,
     rv = object_class_property_add(klass, name, "string",
                               get ? property_get_str : NULL,
                               set ? property_set_str : NULL,
-                              property_release_str,
+                              NULL,
                               prop, &local_err);
     if (local_err) {
         error_propagate(errp, local_err);
@@ -2236,7 +2236,7 @@  object_class_property_add_bool(ObjectClass *klass, const char *name,
     rv = object_class_property_add(klass, name, "bool",
                               get ? property_get_bool : NULL,
                               set ? property_set_bool : NULL,
-                              property_release_bool,
+                              NULL,
                               prop, &local_err);
     if (local_err) {
         error_propagate(errp, local_err);
@@ -2328,7 +2328,7 @@  object_class_property_add_enum(ObjectClass *klass, const char *name,
     rv = object_class_property_add(klass, name, typename,
                               get ? property_get_enum : NULL,
                               set ? property_set_enum : NULL,
-                              property_release_enum,
+                              NULL,
                               prop, &local_err);
     if (local_err) {
         error_propagate(errp, local_err);
@@ -2429,7 +2429,7 @@  object_class_property_add_tm(ObjectClass *klass, const char *name,
 
     rv = object_class_property_add(klass, name, "struct tm",
                               get ? property_get_tm : NULL, NULL,
-                              property_release_tm,
+                              NULL,
                               prop, &local_err);
     if (local_err) {
         error_propagate(errp, local_err);