From: Joseph Morrow Date: Tue, 23 Jun 2015 17:02:27 +0000 (-0400) Subject: Removed memory leaks in CA Unit Tests. X-Git-Tag: 0.9.2-beta~118 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0b30bd578bcaae82916af86d6fa737a0e4d7bda4;p=contrib%2Fiotivity.git Removed memory leaks in CA Unit Tests. 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 Reviewed-on: https://gerrit.iotivity.org/gerrit/1407 Tested-by: jenkins-iotivity Reviewed-by: Erich Keane --- diff --git a/resource/csdk/connectivity/test/caprotocolmessagetest.cpp b/resource/csdk/connectivity/test/caprotocolmessagetest.cpp index 2298169..4791ce0 100644 --- a/resource/csdk/connectivity/test/caprotocolmessagetest.cpp +++ b/resource/csdk/connectivity/test/caprotocolmessagetest.cpp @@ -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); }