Consider releasing memory taken by strings before calling zbx_vector_str_destroy()

XMLWordPrintable

    • Type: Incident report
    • Resolution: Fixed
    • Priority: Trivial
    • 2.0.0rc3
    • Affects Version/s: 2.0.0rc2
    • Component/s: Agent (G)

      zbx_vector_str_destroy() does not release memory used by individual strings contained in the vector. You have to do it explicitly, for example:
      ....
      for (i = 0; i < c_values.values_num; i++)
      zbx_free(c_values.values[i]);
      zbx_vector_str_destroy(&c_values);
      Check Zabbix source code for all places where zbx_vector_str_destroy() is used to avoid memory leaks.

            Assignee:
            Unassigned
            Reporter:
            Andris Mednis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: