Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-2396

UrlRewrite.cc free the node of queue not correctly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.2.0
    • HTTP
    • None

    Description

      the codes as:

      960 void
      961 UrlRewrite::_destroyList(RegexMappingList &mappings)
      962 {
      963   forl_LL(RegexMapping, list_iter, mappings) {
      964     delete list_iter->url_map;
      965     if (list_iter->re) {
      966       pcre_free(list_iter->re);
      967     }
      968     if (list_iter->re_extra) {
      969       pcre_free(list_iter->re_extra);
      970     }
      971     if (list_iter->to_url_host_template) {
      972       ats_free(list_iter->to_url_host_template);
      973     }
      974     delete list_iter;
      975   }
      976   mappings.clear();
      977 }
      

      Can't delete list_iter in the loop because the list_iter is the iterator for the loop.

      Attachments

        Issue Links

          Activity

            People

              happy_fish100 Yu Qing
              happy_fish100 Yu Qing
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: