From 77ec02adbc8f9657e7749b307d3cc86ccbd163ea Mon Sep 17 00:00:00 2001 From: marha Date: Sat, 12 Mar 2011 14:57:48 +0000 Subject: libX11 pixman mesa git update 12 Mar 2011 --- libX11/src/KeyBind.c | 2 +- libX11/src/xkb/XKBGAlloc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'libX11/src') diff --git a/libX11/src/KeyBind.c b/libX11/src/KeyBind.c index cc1906fad..6eb84328c 100644 --- a/libX11/src/KeyBind.c +++ b/libX11/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))) && diff --git a/libX11/src/xkb/XKBGAlloc.c b/libX11/src/xkb/XKBGAlloc.c index 4cd40016b..832d28530 100644 --- a/libX11/src/xkb/XKBGAlloc.c +++ b/libX11/src/xkb/XKBGAlloc.c @@ -696,11 +696,11 @@ register XkbPropertyPtr prop; } prop= &geom->properties[geom->num_properties]; prop->name= (char *)_XkbAlloc(strlen(name)+1); - if (!name) + if (!prop->name) return NULL; strcpy(prop->name,name); prop->value= (char *)_XkbAlloc(strlen(value)+1); - if (!value) { + if (!prop->value) { _XkbFree(prop->name); prop->name= NULL; return NULL; -- cgit v1.2.3