Add cleanup frees in LMS and LMOTS tests

Signed-off-by: Raef Coles <raef.coles@arm.com>
diff --git a/tests/suites/test_suite_lmots.function b/tests/suites/test_suite_lmots.function
index c582ce7..1fec900 100644
--- a/tests/suites/test_suite_lmots.function
+++ b/tests/suites/test_suite_lmots.function
@@ -142,6 +142,8 @@
     }
 
 exit:
+    if( tmp_sig != NULL )
+        mbedtls_free( tmp_sig );
     mbedtls_lmots_public_free( &ctx );
 }
 /* END_CASE */
diff --git a/tests/suites/test_suite_lms.function b/tests/suites/test_suite_lms.function
index c0cf02c..b6ae309 100644
--- a/tests/suites/test_suite_lms.function
+++ b/tests/suites/test_suite_lms.function
@@ -138,6 +138,8 @@
     }
 
 exit:
+    if( tmp_sig != NULL )
+        mbedtls_free( tmp_sig );
     mbedtls_lms_public_free( &ctx );
 }
 /* END_CASE */
@@ -180,6 +182,8 @@
     }
 
 exit:
+    if( exported_pub_key != NULL )
+        mbedtls_free( exported_pub_key );
     mbedtls_lms_public_free( &ctx );
 }
 /* END_CASE */