- fix possible memory leak in NewFromTemplateDlg