Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-5988

Memory leaking occurs in evaluate_LOGEVENTID() and evaluate_STR()

XMLWordPrintable

      Memory leaking occurs in evaluate_LOGEVENTID() and evaluate_STR().
      Both 1.8.x and 2.0.x has same memory leaking.

      Zabbix Server memory leaks in evaluate_STR() and evaluate_LOGEVENTID() in "src/libs/zbxserver/evalfunc.c".
      It doesn't free following strdup() memory in add_regexp_ex() called from evaluate_STR().
      ----------------------------------------------------------------------
      (*regexps)[*regexps_num].name = strdup(name);
      (*regexps)[*regexps_num].expression = strdup(expression);
      ----------------------------------------------------------------------
      "clean_regexps_ex(regexps, regexps_num)" should be called before "zbx_free(regexps)" in evaluate_STR().

      evaluate_STR() and evaluate_LOGEVENTID() are called when using "regexp()", "iregexp()", "logeventid()" trigger functions with "@" type regexp.
      So, the memory leak occurs when using "regexp()", "iregexp()", "logeventid()" trigger functions with "@" type regexp.

      I made patches for zabbix-1.8.15 and zabbix-2.0.4.
      We thank you for your time and are hoping to receive feedback.

            Unassigned Unassigned
            tsuzuki Takanori Suzuki
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: