[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



On Thu, May 22, 2008 at 11:13:31AM +0200, Jim Meyering wrote:
> "Daniel P. Berrange" <berrange redhat com> 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 disables that bit of code.
> >
> > In qparams.c when free'ing the struct the 'p' struct field was not
> > released. I took the opportunity to switch it over to using the new
> > style memory.h functions
> >
> > In remote.c there were  a couple of handlers which forgot to free the
> > virDomainPtr object when they were done.
> >
> >  qemud/remote.c |   18 ++++++++++++++----
> >  src/libvirt.c  |   16 +++++++++-------
> >  src/qparams.c  |   31 +++++++++++++------------------
> >  3 files changed, 36 insertions(+), 29 deletions(-)
> 
> Looks good.
> I suppose the tests that exposed the leaks aren't yet run
> as part of "make check".  It'd be nice...

I've got another patching in works for that, to fully validate OOM
handling, and test qparams completely.

Dan.
-- 
|: Red Hat, Engineering, Boston   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]