Re: [PATCH 2/5] ch_monitor: Correctly close and ref the virCHMonitor

2021-10-03 Thread Douglas, William
On Sun, 2021-10-03 at 15:52 -0400, Laine Stump wrote: > On 10/3/21 3:43 PM, Laine Stump wrote: > >     cleanup: > > +    if (mon) > > +    virCHMonitorClose(mon); > > Oops, I also meant to point out that the "if (mon)" is unnecessary > here, > because (as with all similar functions in

Re: [PATCH 2/5] ch_monitor: Correctly close and ref the virCHMonitor

2021-10-03 Thread Laine Stump
On 10/3/21 3:43 PM, Laine Stump wrote:    cleanup: +    if (mon) +    virCHMonitorClose(mon); Oops, I also meant to point out that the "if (mon)" is unnecessary here, because (as with all similar functions in libvirt) virCHMonitorClose() can be called with a null argument, and will just

Re: [PATCH 3/5] ch: use g_auto in virCHMonitorBuildMemoryJson

2021-10-03 Thread Laine Stump
On 10/1/21 2:12 PM, William Douglas wrote: Signed-off-by: William Douglas --- src/ch/ch_monitor.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/ch/ch_monitor.c b/src/ch/ch_monitor.c index 800457af41..7326ac645b 100644 --- a/src/ch/ch_monitor.c +++

Re: [PATCH 2/5] ch_monitor: Correctly close and ref the virCHMonitor

2021-10-03 Thread Laine Stump
On 10/1/21 2:12 PM, William Douglas wrote: In virCHMontiorNew the monitor object is referenced an additional time incorrectly preventing it from being disposed of. Because the disposal wasn't being used, a bug in virCHMonitorClose that would incorrectly unref the domain object wasn't being seen.

Re: [PATCH 1/5] ch_monitor: Stop leaking json value objects

2021-10-03 Thread Laine Stump
On 10/1/21 2:12 PM, William Douglas wrote: In virCHMonitorBuildKernelRelatedJson there are two cases of json value objects being lost after the pointer being redefined. This change removes the needless redefinition. Signed-off-by: William Douglas Reviewed-by: Laine Stump