[Spice-devel] [spice-gtk] Fix various memory leaks
Daniel P. Berrange
berrange at redhat.com
Wed Jun 13 03:57:28 PDT 2012
On Wed, Jun 13, 2012 at 12:42:16PM +0200, Christophe Fergeau wrote:
> On Wed, Jun 13, 2012 at 01:37:22PM +0300, Alon Levy wrote:
> > > diff --git a/gtk/vncdisplaykeymap.c b/gtk/vncdisplaykeymap.c
> > > index 26a71a4..a6ef38c 100644
> > > --- a/gtk/vncdisplaykeymap.c
> > > +++ b/gtk/vncdisplaykeymap.c
> > > @@ -159,7 +159,7 @@ const guint16 const *vnc_display_keymap_gdk2xtkbd_table(size_t *maplen)
> > > if (!keycodes)
> > > g_warning("could not lookup keycode name");
> > > }
> > > - XkbFreeClientMap(desc, XkbGBN_AllComponentsMask, True);
> > > + XkbFreeKeyboard(desc, XkbGBN_AllComponentsMask, True);
> >
> > Probably worth to hunt down the original copy and fix that too.
>
> I've checked it's the case before including this fix
> http://git.gnome.org/browse/gtk-vnc/commit/?id=229c1061b3fbe34911d8f7b42a3a87c9b8f15931
> I'm assuming this is the original copy, but I wouldn't be surprised if I
> was wrong ;)
QEMU was the original source that GTK-VNC was based on,
but that has also been fixed :-)
commit 229609dd45ee572fb343366a5bf440afb25cf614
Author: Jan Kiszka <jan.kiszka at web.de>
Date: Sat Jun 27 09:59:40 2009 +0200
sdl: Fix memory leakage
Valgrind was so kind to remark that no one bothers to release keycodes
after use and that something is fishy about cleaning up the requested
keyboard descriptor. With this patch applied, we no longer leak about
12k during startup.
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 :|
More information about the Spice-devel
mailing list