Re: [libvirt] PATCH: Fix some more memory leaks

2008-05-22 Thread Daniel P. Berrange
On Thu, May 22, 2008 at 11:13:31AM +0200, Jim Meyering wrote: > > -if (r == -1) return -1; > > +if (r == -1) { > > +virDomainFree (dom); > > +return -1; > > +} > > +virDomainFree (dom); > > Here, you can call virDomainFree just once, before the "if", regardless. I'

Re: [libvirt] PATCH: Fix some more memory leaks

2008-05-22 Thread Daniel P. Berrange
On Thu, May 22, 2008 at 11:13:31AM +0200, Jim Meyering wrote: > "Daniel P. Berrange" <[EMAIL PROTECTED]> wrote: > > While testing Cole's series of patches I identified a couple more places > > where we leak memory. > > > > In libvirt.c, the default authentication callback uses uninitialized > > dat

Re: [libvirt] PATCH: Fix some more memory leaks

2008-05-22 Thread Jim Meyering
"Daniel P. Berrange" <[EMAIL PROTECTED]> wrote: > While testing Cole's series of patches I identified a couple more places > where we leak memory. > > In libvirt.c, the default authentication callback uses uninitialized > data, and indeed strdup()'s it and this is then never released. This > simply

Re: [libvirt] PATCH: Fix some more memory leaks

2008-05-22 Thread Daniel Veillard
On Wed, May 21, 2008 at 10:21:09PM +0100, Daniel P. Berrange wrote: > > While testing Cole's series of patches I identified a couple more places > where we leak memory. > > In libvirt.c, the default authentication callback uses uninitialized > data, and indeed strdup()'s it and this is then never

[libvirt] PATCH: Fix some more memory leaks

2008-05-21 Thread Daniel P. Berrange
While testing Cole's series of patches I identified a couple more places where we leak memory. In libvirt.c, the default authentication callback uses uninitialized data, and indeed strdup()'s it and this is then never released. This simply disables that bit of code. In qparams.c when free'ing th