From da1905b36cec3f1a6910143c85109376496b3886 Mon Sep 17 00:00:00 2001 From: Sukchan Lee Date: Wed, 20 Jul 2022 12:08:17 +0900 Subject: [PATCH] fixed the memory leak in test program --- tests/app/5gc-init.c | 2 +- tests/app/app-init.c | 2 +- tests/registration/reset-test.c | 8 -------- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/tests/app/5gc-init.c b/tests/app/5gc-init.c index b1ad017ac..d7c787079 100644 --- a/tests/app/5gc-init.c +++ b/tests/app/5gc-init.c @@ -101,8 +101,8 @@ void app_terminate(void) if (udm_thread) ogs_thread_destroy(udm_thread); if (ausf_thread) ogs_thread_destroy(ausf_thread); - if (scp_thread) ogs_thread_destroy(scp_thread); if (nrf_thread) ogs_thread_destroy(nrf_thread); + if (scp_thread) ogs_thread_destroy(scp_thread); } void test_5gc_init(void) diff --git a/tests/app/app-init.c b/tests/app/app-init.c index b09a7fbfe..ce8a98dbf 100644 --- a/tests/app/app-init.c +++ b/tests/app/app-init.c @@ -123,8 +123,8 @@ void app_terminate(void) if (hss_thread) ogs_thread_destroy(hss_thread); if (pcrf_thread) ogs_thread_destroy(pcrf_thread); - if (scp_thread) ogs_thread_destroy(scp_thread); if (nrf_thread) ogs_thread_destroy(nrf_thread); + if (scp_thread) ogs_thread_destroy(scp_thread); } void test_app_init(void) diff --git a/tests/registration/reset-test.c b/tests/registration/reset-test.c index cd0807e6e..3112fd589 100644 --- a/tests/registration/reset-test.c +++ b/tests/registration/reset-test.c @@ -676,14 +676,6 @@ static void test3_func(abts_case *tc, void *data) gmmbuf = testgmm_build_registration_request(test_ue, NULL, false, false); ABTS_PTR_NOTNULL(tc, gmmbuf); - test_ue->registration_request_param.gmm_capability = 1; - test_ue->registration_request_param.s1_ue_network_capability = 1; - test_ue->registration_request_param.requested_nssai = 1; - test_ue->registration_request_param.last_visited_registered_tai = 1; - test_ue->registration_request_param.ue_usage_setting = 1; - nasbuf = testgmm_build_registration_request(test_ue, NULL, false, false); - ABTS_PTR_NOTNULL(tc, nasbuf); - sendbuf = testngap_build_initial_ue_message(test_ue, gmmbuf, NGAP_RRCEstablishmentCause_mo_Signalling, false, true); ABTS_PTR_NOTNULL(tc, sendbuf);