Re: [libvirt] [PATCH 2/9] openvz: Convert virExec usage to virCommand

2011-05-17 Thread Cole Robinson
On 05/17/2011 11:12 AM, Eric Blake wrote: > On 05/17/2011 08:24 AM, Cole Robinson wrote: +rc = got; out: VIR_FORCE_CLOSE(outfd); +virCommandFree(cmd); for ( ; got >= 0 ; got--) VIR_FREE(names[got]); >>> >>> Oops, this now frees names[] on su

Re: [libvirt] [PATCH 2/9] openvz: Convert virExec usage to virCommand

2011-05-17 Thread Eric Blake
On 05/17/2011 08:24 AM, Cole Robinson wrote: >>> +rc = got; >>> out: >>> VIR_FORCE_CLOSE(outfd); >>> +virCommandFree(cmd); >>> for ( ; got >= 0 ; got--) >>> VIR_FREE(names[got]); >> >> Oops, this now frees names[] on success. You need to gate this for loop >> on whether

Re: [libvirt] [PATCH 2/9] openvz: Convert virExec usage to virCommand

2011-05-17 Thread Cole Robinson
On 05/13/2011 04:47 PM, Eric Blake wrote: > On 05/13/2011 02:10 PM, Cole Robinson wrote: >> v2: >> Use virCommand's autocleanup >> >> Signed-off-by: Cole Robinson >> --- >> src/openvz/openvz_conf.c | 37 + >> src/openvz/openvz_driver.c | 55 >> ++

Re: [libvirt] [PATCH 2/9] openvz: Convert virExec usage to virCommand

2011-05-13 Thread Eric Blake
On 05/13/2011 02:10 PM, Cole Robinson wrote: > v2: > Use virCommand's autocleanup > > Signed-off-by: Cole Robinson > --- > src/openvz/openvz_conf.c | 37 + > src/openvz/openvz_driver.c | 55 +++ > 2 files changed, 41 i

[libvirt] [PATCH 2/9] openvz: Convert virExec usage to virCommand

2011-05-13 Thread Cole Robinson
v2: Use virCommand's autocleanup Signed-off-by: Cole Robinson --- src/openvz/openvz_conf.c | 37 + src/openvz/openvz_driver.c | 55 +++ 2 files changed, 41 insertions(+), 51 deletions(-) diff --git a/src/openvz/openvz