diff options
Diffstat (limited to 'accel-pptpd/triton/mempool.c')
-rw-r--r-- | accel-pptpd/triton/mempool.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/accel-pptpd/triton/mempool.c b/accel-pptpd/triton/mempool.c index 973fec5..dacb611 100644 --- a/accel-pptpd/triton/mempool.c +++ b/accel-pptpd/triton/mempool.c @@ -47,6 +47,10 @@ void *mempool_alloc(mempool_t *pool) } spin_unlock(&p->lock); it = malloc(sizeof(*it) + p->size); + if (!it) { + triton_log_error("out of memory\n"); + return NULL; + } it->owner = p; it->magic = p->magic; return it->ptr; |