[PATCH openEuler-1.0-LTS 3/5] sched: Fix memory leak on error branch