Removed memory leaks in CA Unit Tests.
authorJoseph Morrow <joseph.l.morrow@intel.com>
Tue, 23 Jun 2015 17:02:27 +0000 (13:02 -0400)
committerErich Keane <erich.keane@intel.com>
Thu, 25 Jun 2015 16:30:48 +0000 (16:30 +0000)
These memory leaks are reported by Valgrind on the build server. With
these removed, the threshold value for memory leaks can be lowered and
further commits will be more resilient.

Change-Id: I606ec487c0a4f0207b85556ed0c48b4f34873907
Signed-off-by: Joseph Morrow <joseph.l.morrow@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1407
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
resource/csdk/connectivity/test/caprotocolmessagetest.cpp

index 2298169..4791ce0 100644 (file)
@@ -92,6 +92,7 @@ TEST(CAProtocolMessage, CAParseURIBase)
 
 
     verifyParsedOptions(cases, numCases, optlist);
+    coap_delete_list(optlist);
 }
 
 // Try for multiple URI path components that still total less than 128
@@ -124,6 +125,7 @@ TEST(CAProtocolMessage, CAParseURIManyPath)
 
 
     verifyParsedOptions(cases, numCases, optlist);
+    coap_delete_list(optlist);
 }
 
 // Try for multiple URI parameters that still total less than 128
@@ -155,6 +157,7 @@ TEST(CAProtocolMessage, CAParseURIManyParams)
 
 
     verifyParsedOptions(cases, numCases, optlist);
+    coap_delete_list(optlist);
 }
 
 // Test that an initial long path component won't hide latter ones.
@@ -181,4 +184,5 @@ TEST(CAProtocolMessage, CAParseURILongPath)
 
 
     verifyParsedOptions(cases, numCases, optlist);
+    coap_delete_list(optlist);
 }