aboutsummaryrefslogtreecommitdiff
path: root/dep/jemalloc/src/rtree.c
diff options
context:
space:
mode:
authorMultivitamin <DasUmba@.(none)>2012-04-13 10:49:09 +0200
committerMultivitamin <DasUmba@.(none)>2012-04-13 10:49:09 +0200
commit126fd13e5d6b57dc0c8830248d44db504c7d103f (patch)
treee33b3e612f5e1e694a7028c4fe5171f0105c6654 /dep/jemalloc/src/rtree.c
parent6400c13fcb342fff7e2d808e469f2c57d83766c5 (diff)
DEP: Updated Jemalloc to Version 2.5
Signed-off-by: Multivitamin <DasUmba@.(none)>
Diffstat (limited to 'dep/jemalloc/src/rtree.c')
-rw-r--r--dep/jemalloc/src/rtree.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/dep/jemalloc/src/rtree.c b/dep/jemalloc/src/rtree.c
index 7753743c5e6..eb0ff1e24af 100644
--- a/dep/jemalloc/src/rtree.c
+++ b/dep/jemalloc/src/rtree.c
@@ -1,4 +1,4 @@
-#define RTREE_C_
+#define JEMALLOC_RTREE_C_
#include "jemalloc/internal/jemalloc_internal.h"
rtree_t *
@@ -20,7 +20,10 @@ rtree_new(unsigned bits)
memset(ret, 0, offsetof(rtree_t, level2bits) + (sizeof(unsigned) *
height));
- malloc_mutex_init(&ret->mutex);
+ if (malloc_mutex_init(&ret->mutex)) {
+ /* Leak the rtree. */
+ return (NULL);
+ }
ret->height = height;
if (bits_per_level * height > bits)
ret->level2bits[0] = bits % bits_per_level;