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

Re: [libvirt] [PATCH libvirt-glib 3/5] Uncomment & fix code for returning config objects



On Tue, Nov 22, 2011 at 02:19:44PM +0100, Christophe Fergeau wrote:
> Hi,
> 
> On Tue, Nov 22, 2011 at 12:39:30PM +0000, Daniel P. Berrange wrote:
> > From: "Daniel P. Berrange" <berrange redhat com>
> > 
> > ---
> >  libvirt-gobject/libvirt-gobject-domain-snapshot.c |    5 +----
> >  libvirt-gobject/libvirt-gobject-interface.c       |    5 +----
> >  libvirt-gobject/libvirt-gobject-network-filter.c  |    5 +----
> >  libvirt-gobject/libvirt-gobject-network.c         |    5 +----
> >  libvirt-gobject/libvirt-gobject-node-device.c     |    6 +-----
> >  libvirt-gobject/libvirt-gobject-secret.c          |    6 +-----
> >  libvirt-gobject/libvirt-gobject-storage-pool.c    |    5 +----
> >  libvirt-gobject/libvirt-gobject-storage-vol.c     |    5 +----
> >  8 files changed, 8 insertions(+), 34 deletions(-)
> > 
> > diff --git a/libvirt-gobject/libvirt-gobject-domain-snapshot.c b/libvirt-gobject/libvirt-gobject-domain-snapshot.c
> > index e536d72..c65a183 100644
> > --- a/libvirt-gobject/libvirt-gobject-domain-snapshot.c
> > +++ b/libvirt-gobject/libvirt-gobject-domain-snapshot.c
> > @@ -210,11 +210,8 @@ GVirConfigDomainSnapshot *gvir_domain_snapshot_get_config
> >          return NULL;
> >      }
> >  
> > -#if 0
> > -    GVirConfigDomainSnapshot *conf = gvir_config_domain_snapshot_new(xml);
> > +    GVirConfigDomainSnapshot *conf = gvir_config_domain_snapshot_new_from_xml(xml, err);
> >  
> >      g_free(xml);
> >      return conf;
> 
> The xml data comes from libvirt, so it should be freed with free(), not
> g_free. The same comment applies to all the other hunks.

Good point, I'll fix that.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


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