Signed-off-by: Jan Friesse <[email protected]>
---
cts/agents/sam_test_agent.c | 13 +++++++++++++
test/testsam.c | 14 ++++++++++++++
2 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/cts/agents/sam_test_agent.c b/cts/agents/sam_test_agent.c
index 583ff03..c395db2 100644
--- a/cts/agents/sam_test_agent.c
+++ b/cts/agents/sam_test_agent.c
@@ -808,6 +808,7 @@ static int test8 (pid_t pid, pid_t old_pid, int test_n) {
if (strcmp(str, "quit") != 0) {
qb_log (LOG_INFO, "Recovery key \"%s\" is not
\"quit\".", key_name);
+ free(str);
return (2);
}
free(str);
@@ -821,6 +822,7 @@ static int test8 (pid_t pid, pid_t old_pid, int test_n) {
if (strcmp(str, "stopped") != 0) {
qb_log (LOG_INFO, "State key is not \"stopped\".");
+ free(str);
return (2);
}
free(str);
@@ -840,6 +842,7 @@ static int test8 (pid_t pid, pid_t old_pid, int test_n) {
if (strcmp(str, "running") != 0) {
qb_log (LOG_INFO, "State key is not \"running\".");
+ free(str);
return (2);
}
free(str);
@@ -859,6 +862,7 @@ static int test8 (pid_t pid, pid_t old_pid, int test_n) {
if (strcmp(str, "stopped") != 0) {
qb_log (LOG_INFO, "State key is not \"stopped\".");
+ free(str);
return (2);
}
free(str);
@@ -874,6 +878,7 @@ static int test8 (pid_t pid, pid_t old_pid, int test_n) {
if (strcmp(str, "stopped") != 0) {
qb_log (LOG_INFO, "State key is not \"stopped\".");
+ free(str);
return (2);
}
free(str);
@@ -893,6 +898,7 @@ static int test8 (pid_t pid, pid_t old_pid, int test_n) {
if (strcmp(str, "running") != 0) {
qb_log (LOG_INFO, "State key is not \"running\".");
+ free(str);
return (2);
}
free(str);
@@ -952,6 +958,7 @@ static int test8 (pid_t pid, pid_t old_pid, int test_n) {
if (strcmp(str, "stopped") != 0) {
qb_log (LOG_INFO, "State key is not
\"stopped\".");
+ free(str);
return (2);
}
free(str);
@@ -977,8 +984,10 @@ static int test8 (pid_t pid, pid_t old_pid, int test_n) {
if (strcmp(str, "failed") != 0) {
qb_log (LOG_INFO, "State key is not \"failed\".");
+ free(str);
return (2);
}
+ free(str);
return (0);
}
@@ -1030,6 +1039,7 @@ static int test9 (pid_t pid, pid_t old_pid, int test_n) {
if (strcmp(str, "restart") != 0) {
qb_log (LOG_INFO, "Recovery key \"%s\" is not
\"restart\".", str);
+ free(str);
return (2);
}
free(str);
@@ -1043,6 +1053,7 @@ static int test9 (pid_t pid, pid_t old_pid, int test_n) {
if (strcmp(str, "stopped") != 0) {
qb_log (LOG_INFO, "State key is not
\"stopped\".");
+ free(str);
return (2);
}
free(str);
@@ -1062,6 +1073,7 @@ static int test9 (pid_t pid, pid_t old_pid, int test_n) {
if (strcmp(str, "running") != 0) {
qb_log (LOG_INFO, "State key is not
\"running\".");
+ free(str);
return (2);
}
free(str);
@@ -1103,6 +1115,7 @@ static int test9 (pid_t pid, pid_t old_pid, int test_n) {
if (strcmp(str, "failed") != 0) {
qb_log (LOG_INFO, "State key is not \"failed\".");
+ free(str);
return (2);
}
free(str);
diff --git a/test/testsam.c b/test/testsam.c
index 7765ffa..208db30 100644
--- a/test/testsam.c
+++ b/test/testsam.c
@@ -768,6 +768,7 @@ static int test7 (void) {
}
if (strcmp(str, "testquorum") != 0) {
printf ("Provider is not testquorum. Test skipped\n");
+ free(str);
return (1);
}
free(str);
@@ -911,6 +912,7 @@ static int test8 (pid_t pid, pid_t old_pid, int test_n) {
if (strcmp(str, "quit") != 0) {
printf ("Recovery key \"%s\" is not \"quit\".\n",
key_name);
+ free(str);
return (2);
}
free(str);
@@ -924,6 +926,7 @@ static int test8 (pid_t pid, pid_t old_pid, int test_n) {
if (strcmp(str, "stopped") != 0) {
printf ("State key is not \"stopped\".\n");
+ free(str);
return (2);
}
free(str);
@@ -943,6 +946,7 @@ static int test8 (pid_t pid, pid_t old_pid, int test_n) {
if (strcmp(str, "running") != 0) {
printf ("State key is not \"running\".\n");
+ free(str);
return (2);
}
free(str);
@@ -962,6 +966,7 @@ static int test8 (pid_t pid, pid_t old_pid, int test_n) {
if (strcmp(str, "stopped") != 0) {
printf ("State key is not \"stopped\".\n");
+ free(str);
return (2);
}
free(str);
@@ -977,6 +982,7 @@ static int test8 (pid_t pid, pid_t old_pid, int test_n) {
if (strcmp(str, "stopped") != 0) {
printf ("State key is not \"stopped\".\n");
+ free(str);
return (2);
}
free(str);
@@ -996,6 +1002,7 @@ static int test8 (pid_t pid, pid_t old_pid, int test_n) {
if (strcmp(str, "running") != 0) {
printf ("State key is not \"running\".\n");
+ free(str);
return (2);
}
free(str);
@@ -1055,6 +1062,7 @@ static int test8 (pid_t pid, pid_t old_pid, int test_n) {
if (strcmp(str, "stopped") != 0) {
printf ("State key is not \"stopped\".\n");
+ free(str);
return (2);
}
free(str);
@@ -1080,8 +1088,10 @@ static int test8 (pid_t pid, pid_t old_pid, int test_n) {
if (strcmp(str, "failed") != 0) {
printf ("State key is not \"failed\".\n");
+ free(str);
return (2);
}
+ free(str);
return (0);
}
@@ -1133,6 +1143,7 @@ static int test9 (pid_t pid, pid_t old_pid, int test_n) {
if (strcmp(str, "restart") != 0) {
printf ("Recovery key \"%s\" is not
\"restart\".\n", str);
+ free(str);
return (2);
}
free(str);
@@ -1146,6 +1157,7 @@ static int test9 (pid_t pid, pid_t old_pid, int test_n) {
if (strcmp(str, "stopped") != 0) {
printf ("State key is not \"stopped\".\n");
+ free(str);
return (2);
}
free(str);
@@ -1165,6 +1177,7 @@ static int test9 (pid_t pid, pid_t old_pid, int test_n) {
if (strcmp(str, "running") != 0) {
printf ("State key is not \"running\".\n");
+ free(str);
return (2);
}
free(str);
@@ -1210,6 +1223,7 @@ static int test9 (pid_t pid, pid_t old_pid, int test_n) {
if (strcmp(str, "failed") != 0) {
printf ("State key is not \"failed\".\n");
+ free(str);
return (2);
}
free(str);
--
1.7.1
_______________________________________________
discuss mailing list
[email protected]
http://lists.corosync.org/mailman/listinfo/discuss