summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErkki Seppälä <erkki.seppala@vincit.fi>2011-01-10 16:37:22 +0200
committerErkki Seppälä <erkki.seppala@vincit.fi>2011-03-11 12:38:08 +0200
commit6a4d027284e7bb5dd458157947bbb1ff580ad071 (patch)
treec0170ab104a3a9026df3fecd231b4d209296291e
parentb993d73bb3214ecc24646f5427c8003b816c6921 (diff)
keyBind: Use Xcalloc to initialize allocated _XKeytrans
Using uninitialized value "p->modifiers" Small fix by using Xcalloc instead of Xmalloc Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
-rw-r--r--src/KeyBind.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/KeyBind.c b/src/KeyBind.c
index 6d80a02..ac25ce2 100644
--- a/src/KeyBind.c
+++ b/src/KeyBind.c
@@ -996,7 +996,7 @@ XRebindKeysym (
tmp = dpy->key_bindings;
nb = sizeof(KeySym) * nm;
- if ((! (p = (struct _XKeytrans *) Xmalloc( sizeof(struct _XKeytrans)))) ||
+ if ((! (p = (struct _XKeytrans *) Xcalloc( 1, sizeof(struct _XKeytrans)))) ||
((! (p->string = (char *) Xmalloc( (unsigned) nbytes))) &&
(nbytes > 0)) ||
((! (p->modifiers = (KeySym *) Xmalloc( (unsigned) nb))) &&