mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-05 06:28:02 +02:00
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>
This commit is contained in:
parent
b993d73bb3
commit
6a4d027284
1 changed files with 1 additions and 1 deletions
|
|
@ -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))) &&
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue