[PATCH 02/32] [libx11] Variable "map" goes out of scope
Erkki Seppälä
erkki.seppala at vincit.fi
Wed Jan 26 23:53:45 PST 2011
Release modifiermap before returning
Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira at nokia.com>
Signed-off-by: Erkki Seppälä <erkki.seppala at 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
More information about the xorg-devel
mailing list