On Thu, Jan 27, 2011 at 09:53:45AM +0200, Erkki Seppälä wrote: > Release modifiermap before returning > > Reviewed-by: Ander Conselvan de Oliveira > <ander.conselvan-de-olive...@nokia.com> > Signed-off-by: Erkki Seppälä <erkki.sepp...@vincit.fi> > --- > modules/im/ximcp/imThaiFlt.c | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletions(-) > > diff --git a/modules/im/ximcp/imThaiFlt.c b/modules/im/ximcp/imThaiFlt.c > index e0b3988..ca8c601 100644 > --- a/modules/im/ximcp/imThaiFlt.c > +++ b/modules/im/ximcp/imThaiFlt.c > @@ -1268,9 +1268,12 @@ NumLockMask(Display *d) > return 0; > > for (i = 0; i < 8; i++) { > - if (map->modifiermap[map->max_keypermod * i] == numlock_keycode) > + if (map->modifiermap[map->max_keypermod * i] == numlock_keycode) { > + XFreeModifiermap(map); > return 1 << i; > + } > } > + XFreeModifiermap(map); > return 0; > } > > -- > 1.7.0.4 >
The first return is still not covered. Maybe relocate the XGetModifierMapping call, or refactor to have one return value. -- Greetings, Dirk _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel