[C-API] Bugfix for ml_pipeline_element_get_handle accepted/tizen/unified/20230830.170550
authorhyunil park <hyunil46.park@samsung.com>
Mon, 28 Aug 2023 03:06:46 +0000 (12:06 +0900)
committerjaeyun-jung <39614140+jaeyun-jung@users.noreply.github.com>
Tue, 29 Aug 2023 06:37:01 +0000 (15:37 +0900)
commit9e653807f906bb3b2e178d8a452d4dd0700b13fa
tree6c96644d1026613b1b5846673afb7067aee3a4ee
parent43eafdb555fb37496cc5017ddb48a100df704961
[C-API] Bugfix for ml_pipeline_element_get_handle

Need to ref element obtained by iterate_element() and unref it in cleanup_node() for common_elem

- common_elem by ml_pipeline_element_get_handle() need to unref in cleaunup_node() because g_hash_table_lookup assign new memory.
  but normal operation, unref is not necessary, so add ref in iterate_element()
- Now, the element's finalize function is called after ml_pipeline_element_get_handle()

Signed-off-by: hyunil park <hyunil46.park@samsung.com>
c/src/ml-api-inference-pipeline.c