-
Problem report
-
Resolution: Fixed
-
Major
-
4.0.1rc2, 4.2.0alpha1
-
Sprint 46, Nov 2018
-
0.125
Index: src/libs/zbxregexp/zbxregexp.c =================================================================== --- src/libs/zbxregexp/zbxregexp.c (revision 86088) +++ src/libs/zbxregexp/zbxregexp.c (working copy) @@ -61,12 +61,15 @@ if(NULL == pcre_regexp) return FAIL; - if(regexp) + if (NULL != regexp) { *regexp = (zbx_regexp_t *)zbx_malloc(NULL, sizeof(zbx_regexp_t)); (*regexp)->pcre_regexp = pcre_regexp; } + else + pcre_free(pcre_regexp); + return SUCCEED; }