Correct potential leaks in xapp class.

Sonar identified some potential memory leaks in the run function
of the xapp class. This change addresses those issues, and ensures
that the unused parameter grumblings which were attempted to be
corrected in the last change are also addressed.

Issue-ID: RIC-629

Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Change-Id: I2fe2f4b681780cd60235a0c38ed4709af871abbe
diff --git a/test/unit_test.sh b/test/unit_test.sh
index a4f9d0a..b49f81b 100755
--- a/test/unit_test.sh
+++ b/test/unit_test.sh
@@ -117,8 +117,11 @@
 
 spew="cat"
 
+# order here is important to ensure coverage files accumulate
+tests="metrics_test jhash_test config_test  unit_test"
+
 #run everything, then generate coverage stats after all have run
-for x in metrics_test jhash_test config_test  unit_test
+for x in $tests
 do
 	./$x >/tmp/PID$$.log 2>&1
 	abort_if_error $? "test failed: $x"
@@ -127,7 +130,7 @@
 # it seems that we loose coverage reporting if metrics_test's gcov file is generated
 # after unit test.  Very strange. To be safe, run unit_test last.
 #
-for x in metrics_test jhash_test config_test unit_test
+for x in $tests
 do
 	gcov $x.c >/dev/null 2>&1
 done