Message ID | 20210827220244.24210-2-jkacur@redhat.com |
---|---|
State | New |
Headers | show |
Series | [1/8] rt-tests: deadline_test: Move va_start forward | expand |
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 *);
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@redhat.com> --- src/sched_deadline/deadline_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)