diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-02-17 20:24:11 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-02-17 20:24:11 +0000 |
commit | d587687f2dcbb282b8b339d4834e4441d98aa2b9 (patch) | |
tree | d5ce7672aaabf652f426f1e58d830af07d5ca7e1 /gcc/bitmap.c | |
parent | 3b934b098e4b421f32b0f5bf7dce9f0f6b6039a9 (diff) | |
download | gcc-d587687f2dcbb282b8b339d4834e4441d98aa2b9.tar.gz |
* bitmap.c (bitmap_operation): Don't leak bitmap elements.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32038 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/bitmap.c')
-rw-r--r-- | gcc/bitmap.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/bitmap.c b/gcc/bitmap.c index f43965c3310..6c6c9787026 100644 --- a/gcc/bitmap.c +++ b/gcc/bitmap.c @@ -477,7 +477,7 @@ bitmap_operation (to, from1, from2, operation) changed = 1; to_tmp = to_ptr; to_ptr = to_ptr->next; - to_tmp = bitmap_free; + to_tmp->next = bitmap_free; bitmap_free = to_tmp; } if (to_ptr && to_ptr->indx == indx) @@ -517,6 +517,11 @@ bitmap_operation (to, from1, from2, operation) to_tmp->indx = indx; bitmap_element_link (to, to_tmp); } + else + { + to_tmp->next = bitmap_free; + bitmap_free = to_tmp; + } } /* If we have elements of TO left over, free the lot. */ |