aboutsummaryrefslogtreecommitdiff
path: root/libX11/src
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-03-12 15:21:19 +0000
committermarha <marha@users.sourceforge.net>2011-03-12 15:21:19 +0000
commite0058f158bae56c5a10cad4f9ace808a27022a9d (patch)
tree0daf3e4bafd8a1c53f8228c41ffd1637c158bb29 /libX11/src
parentb639ce1e238ac06882d504aca591ab62475459c1 (diff)
parent77ec02adbc8f9657e7749b307d3cc86ccbd163ea (diff)
downloadvcxsrv-e0058f158bae56c5a10cad4f9ace808a27022a9d.tar.gz
vcxsrv-e0058f158bae56c5a10cad4f9ace808a27022a9d.tar.bz2
vcxsrv-e0058f158bae56c5a10cad4f9ace808a27022a9d.zip
svn merge ^/branches/released .
Diffstat (limited to 'libX11/src')
-rw-r--r--libX11/src/KeyBind.c2
-rw-r--r--libX11/src/xkb/XKBGAlloc.c4
2 files changed, 3 insertions, 3 deletions
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;