re PR libobjc/11904 (Problem in sarray_free() function.)
2004-01-09 Andrew Ruder <aeruder@ksu.edu> PR libobjc/11904 * sarray.c (sarray_free): Free array->is_copy_of latter. From-SVN: r75630
This commit is contained in:
parent
f01519dd00
commit
b39f186824
|
@ -1,3 +1,8 @@
|
||||||
|
2004-01-09 Andrew Ruder <aeruder@ksu.edu>
|
||||||
|
|
||||||
|
PR libobjc/11904
|
||||||
|
* sarray.c (sarray_free): Free array->is_copy_of latter.
|
||||||
|
|
||||||
2003-12-01 Zack Weinberg <zack@codesourcery.com>
|
2003-12-01 Zack Weinberg <zack@codesourcery.com>
|
||||||
|
|
||||||
PR 11433
|
PR 11433
|
||||||
|
|
|
@ -402,9 +402,6 @@ sarray_free (struct sarray *array) {
|
||||||
#else
|
#else
|
||||||
old_buckets = array->buckets;
|
old_buckets = array->buckets;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ((array->is_copy_of) && ((array->is_copy_of->ref_count - 1) == 0))
|
|
||||||
sarray_free (array->is_copy_of);
|
|
||||||
|
|
||||||
/* Free all entries that do not point to empty_bucket */
|
/* Free all entries that do not point to empty_bucket */
|
||||||
for (counter = 0; counter <= old_max_index; counter++ ) {
|
for (counter = 0; counter <= old_max_index; counter++ ) {
|
||||||
|
@ -462,6 +459,10 @@ sarray_free (struct sarray *array) {
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* If this is a copy, go ahead and decrement/deallocate the original */
|
||||||
|
if (array->is_copy_of)
|
||||||
|
sarray_free (array->is_copy_of);
|
||||||
|
|
||||||
/* free array */
|
/* free array */
|
||||||
sarray_free_garbage (array);
|
sarray_free_garbage (array);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue