........S. [ZBX-3336] fixed fomatting; fixed memory leak; fixed coding style