[PATCH 1/8] rt-tests: deadline_test: Move va_start forward

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux