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

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

 



On Thu, May 22, 2008 at 11:13:31AM +0200, Jim Meyering wrote:
> "Daniel P. Berrange" <berrange@xxxxxxxxxx> 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 :|

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]