On 01/31/11 02:03 AM, Erkki Seppälä wrote: > Small fix by using Xcalloc instead of Xmalloc > > Signed-off-by: Erkki Seppälä <[email protected]> > > 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))) &&
Reviewed-by: Alan Coopersmith <[email protected]> -- -Alan Coopersmith- [email protected] Oracle Solaris Platform Engineering: X Window System _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
