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 9283c49c3..a962c1b0f 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;