aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11/lcPublic.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/lib/X11/lcPublic.c')
-rw-r--r--nx-X11/lib/X11/lcPublic.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/nx-X11/lib/X11/lcPublic.c b/nx-X11/lib/X11/lcPublic.c
index 43b9286e7..1b1fb548a 100644
--- a/nx-X11/lib/X11/lcPublic.c
+++ b/nx-X11/lib/X11/lcPublic.c
@@ -128,10 +128,9 @@ load_public(
_XlcGetResource(lcd, "XLC_XLOCALE", "encoding_name", &values, &num);
str = (num > 0) ? values[0] : "STRING";
- pub->encoding_name = (char*) Xmalloc(strlen(str) + 1);
+ pub->encoding_name = strdup(str);
if (pub->encoding_name == NULL)
return False;
- strcpy(pub->encoding_name, str);
return True;
}