On Tue, 15 Oct 2019 at 11:56, Andrew Jones <drjo...@redhat.com> wrote: > > On Tue, Oct 15, 2019 at 10:59:16AM +0100, Beata Michalska wrote: > > On Tue, 1 Oct 2019 at 14:04, Andrew Jones <drjo...@redhat.com> wrote: > > > + > > > + obj = object_new(object_class_get_name(oc)); > > > + > > > + if (qdict_in) { > > > + Visitor *visitor; > > > + Error *err = NULL; > > > + > > > + visitor = qobject_input_visitor_new(model->props); > > > + visit_start_struct(visitor, NULL, NULL, 0, &err); > > > + if (err) { > > > + object_unref(obj); > > > > Shouldn't we free the 'visitor' here as well ? > > Yes. Good catch. So we also need to fix > target/s390x/cpu_models.c:cpu_model_from_info(), which has the same > construction (the construction from which I derived this) > > > > > > + error_propagate(errp, err); > > > + return NULL; > > > + } > > > + > > What about the rest of the patch? With that fixed for v6 can I > add your r-b? >
I still got this feeling that we could optimize that a bit - which I'm currently on, so hopefully I'll be able to add more comments soon if that proves to be the case. BR Beata > Thanks, > drew