Re: [PATCH v2 3/8] qom: introduce object_new_dynamic()

2024-11-14 Thread Peter Xu
On Mon, Nov 11, 2024 at 03:55:50PM +, Daniel P. Berrangé wrote: > object_new() has a failure scenario where it will assert() if given > an abstract type. Callers which are creating objects based on user > input, or unknown/untrusted type names, must manually check the > result of object_class_i

[PATCH v2 3/8] qom: introduce object_new_dynamic()

2024-11-11 Thread Daniel P . Berrangé
object_new() has a failure scenario where it will assert() if given an abstract type. Callers which are creating objects based on user input, or unknown/untrusted type names, must manually check the result of object_class_is_abstract() before calling object_new() to propagate an Error, instead of a