On Mon, Nov 11, 2024 at 03:55:49PM +0000, Daniel P. Berrangé wrote:
> Since object_new_with_class() accepts a non-const parameter for
> the class, callers should be prepared for failures from unexpected
> input. Add an Error parameter for this and make callers check.
> If the caller does not already have an Error parameter, it is
> satisfactory to use &error_abort if the class parameter choice is
> not driven by untrusted user input.
> 
> This conversion allows removal of any object_class_is_abstract()
> checks immediately before object_new_with_class().
> 
> Signed-off-by: Daniel P. Berrangé <berra...@redhat.com>

Reviewed-by: Peter Xu <pet...@redhat.com>

-- 
Peter Xu


Reply via email to