sched: fix memory leak on init failure