On Thu, Nov 14, 2024 at 02:58:56PM -0500, Peter Xu wrote:
> On Mon, Nov 11, 2024 at 03:55:48PM +0000, Daniel P. Berrangé wrote:
> > @@ -753,7 +761,7 @@ typedef union {
> >  } qemu_max_align_t;
> >  #endif
> >  
> > -static Object *object_new_with_type(Type type)
> > +static Object *object_new_with_type(Type type, Error **errp)
> >  {
> >      Object *obj;
> >      size_t size, align;
> > @@ -777,7 +785,10 @@ static Object *object_new_with_type(Type type)
> >          obj_free = qemu_vfree;
> >      }
> >  
> > -    object_initialize_with_type(obj, size, type);
> > +    if (!object_initialize_with_type(obj, size, type, errp)) {
> > +        g_free(obj);
> 
> obj_free(obj)?

Opps, yes indeed.

> 
> > +        return NULL;
> > +    }
> >      obj->free = obj_free;
> >  
> >      return obj;
> 
> -- 
> Peter Xu
> 

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


Reply via email to