[PATCH v2 xserver 0/2] Fix for XKB geometry leaks when mapping changes

Peter Hutterer peter.hutterer at who-t.net
Wed Mar 30 16:08:26 PDT 2011


On Wed, Mar 30, 2011 at 04:47:29PM +0300, Rami Ylimäki wrote:
> v1
> --
> Running "setxkbmap" repeatedly to change the keyboard mapping may lead
> to leaking of geometry related XKB data. The "setxkbmap" command does
> XkbGetKbdByName request, which copies keymap using XkbCopyKeymap, but
> the copying doesn't always release allocated pointers in _XkbCopyGeom.
> 
> v2
> --
> This version contains fixes based on review comments.
> 
> Previously the _XkbGeomRealloc function was introduced as a static
> function that was only used in _XkbCopyGeom. The function has now been
> made public and is also used by _XkbGeomAlloc.
> 
> Peter Hutterer:
> 
> - Use enum to define how array is cleared.
> - Don't use assertions, just fail the geometry when there are
>   problems.
> 
> Rami Ylimäki (2):
>   xkb: Introduce helper function to handle similar reallocations.
>   xkb: Prevent leaking of XKB geometry information on copy.
> 
>  xkb/XKBGAlloc.c |   64 ++++++++++++++++++++++++---
>  xkb/xkbUtils.c  |  129 ++++++++++++++++--------------------------------------
>  xkb/xkbgeom.h   |   20 +++++++++
>  3 files changed, 114 insertions(+), 99 deletions(-)

both merged, thank you
 
Cheers,
  Peter


More information about the xorg-devel mailing list