summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2008-03-30 15:54:34 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2008-03-30 15:54:34 +0000
commit5610eec6c08eff5fdfd3756e8ebde712624b5059 (patch)
tree41e73794b6af59b8594eadcace7554bc0c392a18 /lib
parent1d45ca8c03ed27912049f405194382e5ba41674d (diff)
- get rid of recalloc() that got introduced here.
- while there fix the computation of the new allocated size. Issue reported by naddy@, ok naddy@.
Diffstat (limited to 'lib')
-rw-r--r--lib/libX11/src/UIThrStubs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libX11/src/UIThrStubs.c b/lib/libX11/src/UIThrStubs.c
index 50da0e4c6..1786510ba 100644
--- a/lib/libX11/src/UIThrStubs.c
+++ b/lib/libX11/src/UIThrStubs.c
@@ -190,8 +190,8 @@ _Xthr_key_create_stub_(unsigned int *key, void (*destructor)(void *))
void **tmp;
if ((_Xthr_last_key_ % XTHR_KEYS_CHUNK) == 0) {
- tmp = recalloc(_Xthr_keys_, 1,
- _Xthr_last_key_ + XTHR_KEYS_CHUNK*sizeof(void *));
+ tmp = realloc(_Xthr_keys_,
+ (_Xthr_last_key_ + XTHR_KEYS_CHUNK)*sizeof(void *));
if (tmp == NULL) {
free(_Xthr_keys_);
return ENOMEM;