From: gichan-jang Date: Wed, 12 Feb 2020 02:03:06 +0000 (+0900) Subject: [Coverity] Fix resource leak X-Git-Tag: submit/tizen/20200212.101153^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2b25535dda715aab3501629718677c71c3b34acc;p=platform%2Fupstream%2Fnnstreamer.git [Coverity] Fix resource leak Fix coverity issues caused by resource leak. CID: 1123663, 1123830, 1123853, 1123860 Signed-off-by: gichan-jang --- diff --git a/tests/tizen_capi/unittest_tizen_capi.cc b/tests/tizen_capi/unittest_tizen_capi.cc index c49fe2f..740b26b 100644 --- a/tests/tizen_capi/unittest_tizen_capi.cc +++ b/tests/tizen_capi/unittest_tizen_capi.cc @@ -995,6 +995,10 @@ TEST (nnstreamer_capi_src, failure_03_n) status = ml_tensors_data_destroy (data); EXPECT_EQ (status, ML_ERROR_NONE); + + status = ml_tensors_info_destroy (info); + EXPECT_EQ (status, ML_ERROR_NONE); + } /** @@ -2618,6 +2622,9 @@ TEST (nnstreamer_capi_singleshot, set_input_info_fail) status = ml_single_close (single); EXPECT_EQ (status, ML_ERROR_NONE); + status = ml_tensors_info_destroy (in_info); + EXPECT_EQ (status, ML_ERROR_NONE); + g_free (test_model); } @@ -2673,6 +2680,9 @@ TEST (nnstreamer_capi_singleshot, set_input_info_fail_01) status = ml_single_close (single); EXPECT_EQ (status, ML_ERROR_NONE); + status = ml_tensors_info_destroy (in_info); + EXPECT_EQ (status, ML_ERROR_NONE); + g_free (test_model); } @@ -2738,6 +2748,9 @@ TEST (nnstreamer_capi_singleshot, set_input_info_success) status = ml_single_close (single); EXPECT_EQ (status, ML_ERROR_NONE); + status = ml_tensors_info_destroy (in_info); + EXPECT_EQ (status, ML_ERROR_NONE); + g_free (test_model); }