aboutsummaryrefslogtreecommitdiff
path: root/libX11/modules/lc/gen/lcGenConv.c
diff options
context:
space:
mode:
Diffstat (limited to 'libX11/modules/lc/gen/lcGenConv.c')
-rw-r--r--libX11/modules/lc/gen/lcGenConv.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libX11/modules/lc/gen/lcGenConv.c b/libX11/modules/lc/gen/lcGenConv.c
index baac73a39..7a113a78a 100644
--- a/libX11/modules/lc/gen/lcGenConv.c
+++ b/libX11/modules/lc/gen/lcGenConv.c
@@ -2660,10 +2660,9 @@ create_conv(
*conv->methods = *methods;
conv->methods->reset = init_state;
- conv->state = (XPointer) Xmalloc(sizeof(StateRec));
+ conv->state = Xcalloc(1, sizeof(StateRec));
if (conv->state == NULL)
goto err;
- bzero((char *) conv->state, sizeof(StateRec));
state = (State) conv->state;
state->lcd = lcd;