remove buffers from commit_buffer_list when commit failed. 76/142776/1
authorBoram Park <boram1288.park@samsung.com>
Mon, 7 Aug 2017 07:57:16 +0000 (16:57 +0900)
committerBoram Park <boram1288.park@samsung.com>
Mon, 7 Aug 2017 08:00:53 +0000 (17:00 +0900)
commit6aac53b7e9506ce76a53e2f5e8852f09b90b4c5d
tree2ad53f6c0d4394f972030b0b11efaa5bc54181ab
parent64548b108119a23117924598442f621a04675369
remove buffers from commit_buffer_list when commit failed.

When pp, commit is the sync operation, cb_done() will be called at the line of
commit(). In this case, buffers will be freed in cb_done() before
LIST_FOR_EACH_ENTRY_SAFE(b, bb, &commit_buffer_list, commit_link) line done.
So commit_link should be deleted when freed.

When commit() successed, commit_link will be deleted twice. So we need to use
LIST_DELINIT instead of LIST_DEL

Change-Id: I6a09878e1eae49d31eb3f3626e005a3ae10841d8
src/tdm_capture.c
src/tdm_pp.c