diff --git a/test/cmp_icu/test_cmp_decmp.c b/test/cmp_icu/test_cmp_decmp.c
index 9eb587e96c8a34379ac56e8bb5a452ef8a891fe4..a1ac615317fd21c6b200ad2263cd529d942319bd 100644
--- a/test/cmp_icu/test_cmp_decmp.c
+++ b/test/cmp_icu/test_cmp_decmp.c
@@ -493,9 +493,14 @@ void compression_decompression(struct cmp_cfg *cfg)
 	int data_size, cmp_data_size;
 	struct cmp_entity *ent;
 	void *decompressed_data;
-	static void *model_of_data;
+	static void *model_of_data = NULL;
 	void *updated_model = NULL;
 
+	if (!cfg) {
+		free(model_of_data);
+		return;
+	}
+
 	TEST_ASSERT_NOT_NULL(cfg);
 
 	TEST_ASSERT_NULL(cfg->icu_output_buf);
@@ -611,6 +616,7 @@ void test_random_compression_decompression(void)
 		free(data_to_compress2);
 		free(updated_model);
 	}
+	compression_decompression(NULL);
 }
 
 #define N_SAMPLES 5
diff --git a/test/cmp_icu/test_cmp_icu.c b/test/cmp_icu/test_cmp_icu.c
index 65ab54581940e79ad902c1c272bd76c51604ab30..a1ba7f9bc39ccbe059b5a4d9cdb8fca55beb5de1 100644
--- a/test/cmp_icu/test_cmp_icu.c
+++ b/test/cmp_icu/test_cmp_icu.c
@@ -2740,6 +2740,9 @@ void test_compress_s_fx_raw(void)
 		TEST_ASSERT_EQUAL_HEX(data[i].exp_flags, p[i].exp_flags);
 		TEST_ASSERT_EQUAL_HEX(data[i].fx, cpu_to_be32(p[i].fx));
 	}
+
+	free(cfg.input_buf);
+	free(cfg.icu_output_buf);
 }
 
 
diff --git a/test/cmp_icu/test_decmp.c b/test/cmp_icu/test_decmp.c
index 6f2fe2df2451f456793b1017b548ce04ed01950c..e1d7025b83272b2adf98fd152ba1ca041f3b71c2 100644
--- a/test/cmp_icu/test_decmp.c
+++ b/test/cmp_icu/test_decmp.c
@@ -437,6 +437,8 @@ void test_cmp_decmp_s_fx_diff(void)
 	/* 		if (up_model[i] != de_up_model[i]) */
 	/* 			TEST_ASSERT(0); */
 	/* } */
+	free(ent);
+	free(decompressed_data);
 }
 #undef DATA_SAMPLES
 
@@ -629,6 +631,7 @@ void test_s_fx_diff(void)
 	for (i = 0; i < s; ++i) {
 		TEST_ASSERT_EQUAL(result_data[i], decompressed_data[i]);
 	}
+	free(decompressed_data);
 }