...G...PS. [ZBXNEXT-497] fixed a bit of style and a memory leak during code review