Re: [libvirt] [PATCH] remote: avoid memory leak on successful path

2012-01-17 Thread Alex Jia
On 01/18/2012 05:32 AM, Eric Blake wrote: On 01/17/2012 02:59 AM, a...@redhat.com wrote: From: Alex Jia when everything is okay, 'rv' will be 0, however, 'cleanup' lable only free allocated memory with 'rv< 0', so memory leak on successful path. The patch uses new virTypedParameterArrayClear f

Re: [libvirt] [PATCH] remote: avoid memory leak on successful path

2012-01-17 Thread Eric Blake
On 01/17/2012 02:59 AM, a...@redhat.com wrote: > From: Alex Jia > > when everything is okay, 'rv' will be 0, however, 'cleanup' lable only free > allocated memory with 'rv < 0', so memory leak on successful path. The patch > uses new virTypedParameterArrayClear function to free memory instead. >

[libvirt] [PATCH] remote: avoid memory leak on successful path

2012-01-17 Thread ajia
From: Alex Jia when everything is okay, 'rv' will be 0, however, 'cleanup' lable only free allocated memory with 'rv < 0', so memory leak on successful path. The patch uses new virTypedParameterArrayClear function to free memory instead. * src/remote/remote_driver.c: fix memory leak on remoteDe