ecore_file_monitor: replace EINA_LIST_FOREACH to EINA_LIST_FOREACH_SAFE 90/167790/2
authorWooHyun Jung <wh0705.jung@samsung.com>
Mon, 15 Jan 2018 04:54:01 +0000 (13:54 +0900)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Mon, 5 Feb 2018 02:00:47 +0000 (02:00 +0000)
commitb93f75117edabe7466fa7fa334bb3e6457bdc9da
tree333f8b6adb5883fc23a8e98c631c58ac0c3436d5
parent50fe28cccf202566a9ce10c6615d3f0d8094f3c9
ecore_file_monitor: replace EINA_LIST_FOREACH to EINA_LIST_FOREACH_SAFE

If ecore_file_monitor_del is called inside the file monitor callback function,
eina_list found from monitor_hash would be freed. (You can check this inside
eina_hash_list_remove.)
Then, EINA_LIST_FOREACH makes one more for loop with invalid eina_list pointer.

EINA_LIST_FOREACH_SAFE can prevent from this problem.

Change-Id: I3562cc310632a24ba9435b6e36f5a5ba8bf2d429
src/lib/ecore_file/ecore_file_monitor_inotify.c