-
Incident report
-
Resolution: Fixed
-
Blocker
-
2.0.13, 2.2.6, 2.4.1, 2.5.0
In the following code at src/zabbix_server/actions.c:116
do { result = DBselect( "select distinct i.hostid,t.templateid" " from items i,functions f,triggers t" " where i.itemid=f.itemid" " and f.triggerid=t.templateid" " and t.triggerid=" ZBX_FS_UI64, triggerid); if (NULL != (row = DBfetch(result))) { ZBX_STR2UINT64(hostid, row[0]); ZBX_STR2UINT64(triggerid, row[1]); if (hostid == condition_value) { ret = SUCCEED; break; } } else triggerid = 0; DBfree_result(result); } while (SUCCEED != ret && 0 != triggerid);
the result variable might not be freed with DBfree_result().
A patch to fix it:
Index: src/zabbix_server/actions.c
===================================================================
--- src/zabbix_server/actions.c (revision 50119)
+++ src/zabbix_server/actions.c (working copy)
@@ -129,10 +129,7 @@
ZBX_STR2UINT64(triggerid, row[1]);
if (hostid == condition_value)
- {
ret = SUCCEED;
- break;
- }
}
else
triggerid = 0;