diff options
author | Jeremy Allison <jra@samba.org> | 1999-01-18 18:57:33 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1999-01-18 18:57:33 +0000 |
commit | a9e913df276be56f2ec1b12efbd330ff7fd5cf8b (patch) | |
tree | d81be3daf24dba340177cb7ca4a13e141defd7da | |
parent | 16f3d0c764ba80d1b5b64a0b07bf24ee92be45be (diff) | |
download | samba-a9e913df276be56f2ec1b12efbd330ff7fd5cf8b.tar.gz samba-a9e913df276be56f2ec1b12efbd330ff7fd5cf8b.tar.xz samba-a9e913df276be56f2ec1b12efbd330ff7fd5cf8b.zip |
Fixed typo in bitmap code that could cause core dump on malloc fail.
Jeremy.
-rw-r--r-- | source/lib/bitmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/lib/bitmap.c b/source/lib/bitmap.c index 93c821c5285..1813d63ff77 100644 --- a/source/lib/bitmap.c +++ b/source/lib/bitmap.c @@ -35,10 +35,10 @@ struct bitmap *bitmap_allocate(int n) struct bitmap *bm; bm = (struct bitmap *)malloc(sizeof(*bm)); - bm->n = n; if (!bm) return NULL; + bm->n = n; bm->b = (uint32 *)malloc(sizeof(bm->b[0])*(n+31)/32); if (!bm->b) { free(bm); |