hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odiache...@apache.org
Subject incubator-hawq git commit: HAWQ-400. Support expected exit codes for regression tests, fixed leaks. [Forced Update!]
Date Fri, 19 Feb 2016 03:43:33 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/HAWQ-400 1b362bbf6 -> 3163e6c5f (forced update)


HAWQ-400. Support expected exit codes for regression tests, fixed leaks.


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/3163e6c5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/3163e6c5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/3163e6c5

Branch: refs/heads/HAWQ-400
Commit: 3163e6c5fab18f9d754c56bb8818f34afd0a993e
Parents: 73eb65f
Author: Oleksandr Diachenko <odiachenko@pivotal.io>
Authored: Thu Feb 18 15:03:20 2016 -0800
Committer: Oleksandr Diachenko <odiachenko@pivotal.io>
Committed: Thu Feb 18 19:43:23 2016 -0800

----------------------------------------------------------------------
 src/test/regress/pg_regress.c | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/3163e6c5/src/test/regress/pg_regress.c
----------------------------------------------------------------------
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c
index b1f1846..21469ad 100644
--- a/src/test/regress/pg_regress.c
+++ b/src/test/regress/pg_regress.c
@@ -780,6 +780,8 @@ doputenv(const char *var, const char *val)
 
 	sprintf(s, "%s=%s", var, val);
 	putenv(s);
+
+	free(s);
 }
 
 /*
@@ -844,6 +846,8 @@ initialize_environment(void)
 		new_pgoptions = malloc(strlen(old_pgoptions) + strlen(my_pgoptions) + 12);
 		sprintf(new_pgoptions, "PGOPTIONS=%s %s", old_pgoptions, my_pgoptions);
 		putenv(new_pgoptions);
+
+		free(new_pgoptions);
 	}
 
 	{
@@ -982,6 +986,7 @@ spawn_process(const char *cmdline)
 		execl(shellprog, shellprog, "-c", cmdline2, (char *) NULL);
 		fprintf(stderr, _("%s: could not exec \"%s\": %s\n"),
 				progname, shellprog, strerror(errno));
+		free(cmdline2);
 		exit(1);				/* not exit_nicely here... */
 	}
 	/* in parent */
@@ -1057,6 +1062,7 @@ spawn_process(const char *cmdline)
 
 	cmdline2 = malloc(strlen(cmdline) + 8);
 	sprintf(cmdline2, "cmd /c %s", cmdline);
+	free(cmdline2);
 
 #ifndef __CYGWIN__
 	AddUserToTokenDacl(restrictedToken);
@@ -2157,6 +2163,7 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function
tfunc
 				initfile = strdup(optarg);
 				break;
 			case 20:
+				expected_statuses_file = NULL;
 				expected_statuses_file = strdup(optarg);
 				break;
 			default:


Mime
View raw message