[C-Api] fix memory leak bug
authorSangjung Woo <sangjung.woo@samsung.com>
Thu, 18 Jul 2019 10:20:51 +0000 (19:20 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Fri, 19 Jul 2019 00:44:38 +0000 (09:44 +0900)
commitfe571a4fb606587096a1605f2bd0597523ad3922
treeaa234184f85870d46a57030b702e9f7c7af696b9
parentcdb1a552e79f60953d7a85df6c0883856c2280cd
[C-Api] fix memory leak bug

Since developers can reduce the number of Tensors by calling
ml_tensors_info_set_count(), it causes the memory leak when invoking
ml_tensors_info_free() and ml_tensors_data_destroy(). This patch fixes
that bug by checking all possible elements (i.e. ML_TENSOR_SIZE_LIMIT).

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
api/capi/src/nnstreamer-capi-util.c