free window on init error

wrong variable