summaryrefslogtreecommitdiff
path: root/xkb/xkbInit.c
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2007-11-05 13:59:15 +0000
committerDaniel Stone <daniel@fooishbar.org>2007-11-05 14:34:41 +0000
commit59774af86b851c7fb8989cef6c013522549000b8 (patch)
tree0d5e626e0a4b4984d6e97f57980275c9314c6568 /xkb/xkbInit.c
parent6e4f5cf83f35ffebb51633ab30b1826e63e37223 (diff)
XKB: Remove usage of alloca
alloca has no way to return failure, and instead can possibly arbitrarily overflow the stack. Let's avoid that one.
Diffstat (limited to 'xkb/xkbInit.c')
-rw-r--r--xkb/xkbInit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c
index c0867adf0..6301a32e7 100644
--- a/xkb/xkbInit.c
+++ b/xkb/xkbInit.c
@@ -182,7 +182,7 @@ char * pval;
ErrorF("Atom error: %s not created\n",_XKB_RF_NAMES_PROP_ATOM);
return True;
}
- pval= (char*) ALLOCATE_LOCAL(len);
+ pval= (char*) xalloc(len);
if (!pval) {
ErrorF("Allocation error: %s proprerty not created\n",
_XKB_RF_NAMES_PROP_ATOM);
@@ -223,7 +223,7 @@ char * pval;
}
ChangeWindowProperty(WindowTable[0],name,XA_STRING,8,PropModeReplace,
len,pval,True);
- DEALLOCATE_LOCAL(pval);
+ xfree(pval);
return True;
}