Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=55678
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=68538
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=69088

The way it's currently cached is not thread safe. As long as locale
doesn't change, the same object is reused anyway.

Signed-off-by: Jacek Caban <ja...@codeweavers.com>
---
 src/xlibi18n/lcWrap.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/src/xlibi18n/lcWrap.c b/src/xlibi18n/lcWrap.c
index 43b4d622..5339dcf3 100644
--- a/src/xlibi18n/lcWrap.c
+++ b/src/xlibi18n/lcWrap.c
@@ -352,17 +352,7 @@ _XCloseLC(
 XLCd
 _XlcCurrentLC(void)
 {
-    XLCd lcd;
-    static XLCd last_lcd = NULL;
-
-    lcd = _XOpenLC((char *) NULL);
-
-    if (last_lcd)
-       _XCloseLC(last_lcd);
-
-    last_lcd = lcd;
-
-    return lcd;
+    return _XOpenLC(NULL);
 }
  XrmMethods
-- 
2.13.0


_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to