| 396 | */ |
| 397 | |
| 398 | void my_error_unregister_all(void) |
| 399 | { |
| 400 | struct my_err_head *cursor, *saved_next; |
| 401 | |
| 402 | for (cursor= my_errmsgs_globerrs.meh_next; cursor != NULL; cursor= saved_next) |
| 403 | { |
| 404 | /* We need this ptr, but we're about to free its container, so save it. */ |
| 405 | saved_next= cursor->meh_next; |
| 406 | |
| 407 | my_free(cursor); |
| 408 | } |
| 409 | my_errmsgs_globerrs.meh_next= NULL; /* Freed in first iteration above. */ |
| 410 | |
| 411 | my_errmsgs_list= &my_errmsgs_globerrs; |
| 412 | } |