diff options
Diffstat (limited to 'source3/lib/bitmap.c')
-rw-r--r-- | source3/lib/bitmap.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/source3/lib/bitmap.c b/source3/lib/bitmap.c index 7625f52909..2ae9defb2d 100644 --- a/source3/lib/bitmap.c +++ b/source3/lib/bitmap.c @@ -41,7 +41,7 @@ struct bitmap *bitmap_allocate(int n) bm->n = n; bm->b = (uint32 *)malloc(sizeof(bm->b[0])*(n+31)/32); if (!bm->b) { - free(bm); + SAFE_FREE(bm); return NULL; } @@ -59,10 +59,8 @@ void bitmap_free(struct bitmap *bm) if (!bm) return; - if(bm->b) - free(bm->b); - - free(bm); + SAFE_FREE(bm->b); + SAFE_FREE(bm); } /**************************************************************************** |