ccs_list_release was trying to manually delete the iterators with a
broken for loop which skipped iterators. Since the iterators were referenced
by the client, when the client exited it would tell the iterators to release
themselves. The orphaned itertors would attempt to remove themselves from
their list (which had been released) resulting in a crash.
ticket: new
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20510
dc483132-0cff-0310-8789-
dd5450dbe970
{
cc_int32 err = ccNoError;
- if (!err && io_list) {
- cc_uint64 i;
-
- for (i = 0; i < cci_array_count (io_list->iterators); i++) {
- ccs_list_iterator_release ((ccs_list_iterator_t) cci_array_object_at_index (io_list->iterators, i));
- }
- free (io_list->iterators);
+ if (!err && io_list) {
+ cci_array_release (io_list->iterators);
cci_array_release (io_list->objects);
free (io_list);
}
if (!err && equal) {
found = 1;
*out_object_index = i;
+ break;
}
}
}
if (!err && equal) {
found = 1;
*out_object_index = i;
+ break;
}
}
}