fixed some handle leaks in RegDeleteTree() in some failure cases