Sentinel: removed mem leak and useless code.