aboutsummaryrefslogtreecommitdiff
path: root/gcc/bitmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/bitmap.c')
-rw-r--r--gcc/bitmap.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/bitmap.c b/gcc/bitmap.c
index cbedf2c..275e440 100644
--- a/gcc/bitmap.c
+++ b/gcc/bitmap.c
@@ -241,9 +241,12 @@ bitmap_malloc_alloc (void)
void
bitmap_obstack_free (bitmap map)
{
- bitmap_clear (map);
- map->first = (void *)map->obstack->heads;
- map->obstack->heads = map;
+ if (map)
+ {
+ bitmap_clear (map);
+ map->first = (void *)map->obstack->heads;
+ map->obstack->heads = map;
+ }
}
/* Release a malloc allocated bitmap. */