On Mon, Apr 16, 2018 at 01:06:56AM -0500, Chris Venteicher wrote: > New function qemuMonitorJSONBuildCPUModelInfo created by extracting code > from existing function qemuMonitorJSONGetCPUModelExpansion to create a > reusable function for extracting cpu model info from json. > --- > src/qemu/qemu_monitor_json.c | 82 ++++++++++++++++++++++++++++++-------------- > 1 file changed, 56 insertions(+), 26 deletions(-) > ... > + if (virJSONValueObjectForeachKeyValue(cpu_props, > + qemuMonitorJSONParseCPUModelProperty, > + machine_model) < 0) > + goto cleanup; > + > + ret = 0; > + *model = machine_model; > + machine_model = NULL; we also tend to use VIR_STEAL_PTR(dst, src) in ^this case. Erik -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list