aboutsummaryrefslogtreecommitdiff
path: root/libX11/modules/im/ximcp/imDefIc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libX11/modules/im/ximcp/imDefIc.c')
-rw-r--r--libX11/modules/im/ximcp/imDefIc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libX11/modules/im/ximcp/imDefIc.c b/libX11/modules/im/ximcp/imDefIc.c
index 27e04e11c..cd3ed5854 100644
--- a/libX11/modules/im/ximcp/imDefIc.c
+++ b/libX11/modules/im/ximcp/imDefIc.c
@@ -1425,10 +1425,9 @@ _XimProtoCreateIC(
if (!(_XimGetInputStyle(arg, &input_style)))
return (XIC)NULL;
- if ((ic = (Xic)Xmalloc(sizeof(XicRec))) == (Xic)NULL)
+ if ((ic = Xcalloc(1, sizeof(XicRec))) == (Xic)NULL)
return (XIC)NULL;
- bzero((char *)ic, sizeof(XicRec));
ic->methods = &ic_methods;
ic->core.im = (XIM)im;
ic->core.input_style = input_style;