If open_cpuset fails then we return without calling va_end Fixing this by moving the call to va_start after that. Signed-off-by: John Kacur <jkacur@xxxxxxxxxx> --- src/sched_deadline/deadline_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sched_deadline/deadline_test.c b/src/sched_deadline/deadline_test.c index a48c231c1281..e89654d976f2 100644 --- a/src/sched_deadline/deadline_test.c +++ b/src/sched_deadline/deadline_test.c @@ -728,12 +728,12 @@ static const char *make_cpuset(const char *name, const char *cpus, int *pids; int i; - va_start(ap, flags); - fd = open_cpuset(path, "tasks"); if (fd < 0) return "open tasks"; + va_start(ap, flags); + ret = 0; pids = va_arg(ap, int *); -- 2.31.1