[virt-tools-list] [PATCH virt-viewer 1/2] VirtViewer: Fix memory leaks

Fabiano Fidêncio fabiano at fidencio.org
Wed Sep 10 21:06:06 UTC 2014


On Sep 10, 2014 10:47 PM, "Fabiano Fidêncio" <fabiano at fidencio.org> wrote:
>
>
> On Sep 10, 2014 8:42 PM, "Jonathon Jongsma" <jjongsma at redhat.com> wrote:
> >
> > Don't leak priv->uri or priv->domkey from VirtViewer class
> > ---
> >  src/virt-viewer.c | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> >
> > diff --git a/src/virt-viewer.c b/src/virt-viewer.c
> > index c03503e..55780af 100644
> > --- a/src/virt-viewer.c
> > +++ b/src/virt-viewer.c
> > @@ -518,6 +518,14 @@ virt_viewer_dispose (GObject *object)
> >          virDomainFree(priv->dom);
> >      if (priv->conn)
> >          virConnectClose(priv->conn);
> > +    if (priv->uri) {
> > +        g_free(priv->uri);
> > +        priv->uri = NULL;
> > +    }
> > +    if (priv->domkey) {
> > +        g_free(priv->domkey);
> > +        priv->domkey = NULL;
> > +    }
> >      G_OBJECT_CLASS(virt_viewer_parent_class)->dispose (object);
> >  }
> >
> > --
> > 1.9.3
> >
> > _______________________________________________
> > virt-tools-list mailing list
> > virt-tools-list at redhat.com
> > https://www.redhat.com/mailman/listinfo/virt-tools-list
>
> Back.

I meant ACK. :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20140910/2849c18f/attachment.htm>


More information about the virt-tools-list mailing list