aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nx-X11/lib/X11/XDefaultIMIF.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/nx-X11/lib/X11/XDefaultIMIF.c b/nx-X11/lib/X11/XDefaultIMIF.c
index 4e75fa0b4..7c32ce296 100644
--- a/nx-X11/lib/X11/XDefaultIMIF.c
+++ b/nx-X11/lib/X11/XDefaultIMIF.c
@@ -202,9 +202,8 @@ _XDefaultOpenIM(
}
}
#undef MODIFIER
- if ((im->core.im_name = Xmalloc(i+1)) == NULL)
+ if ((im->core.im_name = strdup(buf)) == NULL)
goto Error;
- strcpy(im->core.im_name, buf);
im->methods = (XIMMethods)&local_im_methods;
im->core.lcd = lcd;