@samitouri / QOSamiQemu / commits / 55a5a1b895

qom: allow object_new_with_prop* to trigger module loading

The object_new_with_prop* methods will shortly be replacing the user_creatable_add_type method. In order to do that, the object_new_with_prop* methods must allow module loading to be triggered for any types. Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>

Daniel P. Berrangé committed May 8, 2026 at 11:49 UTC 55a5a1b8950932b25da6be3b2205f050087f28a4
1 file changed +1 -1
qom/object.c
+1 -1
@@ -774,7 +774,7 @@ object_new_with_props_helper(const char *typename,
774 return NULL;
775 }
776
777 - klass = object_class_by_name(typename);
777 + klass = module_object_class_by_name(typename);
778 if (!klass) {
779 error_setg(errp, "invalid object type: %s", typename);
780 return NULL;