diff options
Diffstat (limited to 'lib/resource.c')
-rw-r--r-- | lib/resource.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/resource.c b/lib/resource.c index ce0ba14..f2a0c77 100644 --- a/lib/resource.c +++ b/lib/resource.c @@ -8,6 +8,7 @@ #include <stdio.h> #include <stdlib.h> +#include <string.h> #include "nest/bird.h" #include "lib/resource.h" @@ -156,6 +157,14 @@ mb_alloc(pool *p, unsigned size) return b->data; } +void * +mb_allocz(pool *p, unsigned size) +{ + void *x = mb_alloc(p, size); + bzero(x, size); + return x; +} + void mb_free(void *m) { |