From c256bec35a28f392fd3b0c5e4dc09976c8399420 Mon Sep 17 00:00:00 2001 From: Jihoon Jung Date: Mon, 31 Aug 2020 08:35:31 +0900 Subject: [PATCH] Fix Svace issues #446512~446516 Change-Id: I96c1e7456abf89753d6b75808ca3260338e8bc7c Signed-off-by: Jihoon Jung --- tests/capi-network-uwb-test.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/capi-network-uwb-test.c b/tests/capi-network-uwb-test.c index 7fbd64d..e8207bb 100644 --- a/tests/capi-network-uwb-test.c +++ b/tests/capi-network-uwb-test.c @@ -371,6 +371,9 @@ void test_set_position(void) ret = uwb_node_set_position(own_node, test_x, test_y, test_z); __print_result(ret, "uwb_node_set_position"); + + ret = uwb_node_destroy(own_node); + __print_result(ret, "uwb_node_destroy"); } void test_send_message(void) @@ -384,6 +387,9 @@ void test_send_message(void) ret = uwb_node_send_message((const unsigned char *)test_string, strlen(test_string)); __print_result(ret, "uwb_node_send_message"); + + ret = uwb_node_destroy(own_node); + __print_result(ret, "uwb_node_destroy"); } void test_send_message_to(void) @@ -397,6 +403,9 @@ void test_send_message_to(void) ret = uwb_node_send_message_to(own_node, (const unsigned char *)test_string, strlen(test_string)); __print_result(ret, "uwb_node_send_message"); + + ret = uwb_node_destroy(own_node); + __print_result(ret, "uwb_node_destroy"); } void test_get_configuration(void) @@ -486,8 +495,12 @@ void test_set_configuration(void) __print_result(ret, "uwb_node_set_configuration_int64"); } else if (data_type == 2) { printf("Input string :\n"); - if (scanf(" %255ms", &string_data) < 1) + if (scanf(" %255ms", &string_data) < 1) { + ret = uwb_node_destroy(own_node); + __print_result(ret, "uwb_node_destroy"); + return; + } ret = uwb_node_set_configuration_string(own_node, key, string_data); __print_result(ret, "uwb_node_set_configuration_string"); } -- 2.7.4