[Bug 538399] dx-4.4.4-226.10: code in wrong order and a memory leak