[Tests/Src/IIO] Fix defects about resource leak found from Coverity
authorWook Song <wook16.song@samsung.com>
Tue, 12 Nov 2019 08:10:53 +0000 (17:10 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Thu, 14 Nov 2019 09:06:41 +0000 (18:06 +0900)
This patch fixes those resource leak defects which newly caused by the
previous patch set.

Signed-off-by: Wook Song <wook16.song@samsung.com>
tests/nnstreamer_source/unittest_src_iio.cpp

index d8742b4..a9147d9 100644 (file)
@@ -1129,7 +1129,6 @@ TEST (test_tensor_src_iio, \
   data_buffer = (gchar *) malloc (bytes_to_read); \
   ASSERT_TRUE (data_buffer != NULL); \
   ret = read (fd, data_buffer, bytes_to_read); \
-  ASSERT_GE (ret, 0); \
   bytes_read = static_cast<size_t>(ret); \
   EXPECT_EQ (bytes_read, bytes_to_read); \
   expect_val_mask = G_MAXUINT64 >> (64 - data_bits); \