This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Add missing va_end calls (bug 17243)


va_end is a no-op in gcc, so this doesn't affect the generated code in
any way.  Installed as obvious.

Andreas.

	[BZ #17243]
	* posix/execl.c (execl): Add missing va_end.
	* posix/execle.c (execle): Likewise.
	* posix/execlp.c (execlp): Likewise.

diff --git a/posix/execl.c b/posix/execl.c
index 7d89192..192b492 100644
--- a/posix/execl.c
+++ b/posix/execl.c
@@ -50,6 +50,7 @@ execl (const char *path, const char *arg, ...)
 	    {
 	      if (argv != initial_argv)
 		free (argv);
+	      va_end (args);
 	      return -1;
 	    }
 	  if (argv == initial_argv)
diff --git a/posix/execle.c b/posix/execle.c
index dff95b2..33cd09f 100644
--- a/posix/execle.c
+++ b/posix/execle.c
@@ -48,6 +48,7 @@ execle (const char *path, const char *arg, ...)
 	    {
 	      if (argv != initial_argv)
 		free (argv);
+	      va_end (args);
 	      return -1;
 	    }
 	  if (argv == initial_argv)
diff --git a/posix/execlp.c b/posix/execlp.c
index 5e45de9..7fc2740 100644
--- a/posix/execlp.c
+++ b/posix/execlp.c
@@ -50,6 +50,7 @@ execlp (const char *file, const char *arg, ...)
 	    {
 	      if (argv != initial_argv)
 		free (argv);
+	      va_end (args);
 	      return -1;
 	    }
 	  if (argv == initial_argv)
-- 
2.5.2

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]