Prohibit engine ID access after tts_core_deinitialize() 61/291461/1
authorSuyeon Hwang <stom.hwang@samsung.com>
Mon, 17 Apr 2023 06:48:57 +0000 (15:48 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Mon, 17 Apr 2023 06:48:57 +0000 (15:48 +0900)
commit273fae6b76567cd5cae6d2e1fb4edf2acac76f0b
tree081fac3e5d26134dc3f9437732b9baf177b61256
parent7a18d0f1e525e0c6d2fcf6e65dd98d6a39326510
Prohibit engine ID access after tts_core_deinitialize()

- Issue:
check_engine_launching_status() is invoked and it makes the segmentation
fault even though tts_core_deinitialize() is already finished.

- Solution:
After tts_core_deinitialize(), there is no client, so
check_engine_launching_stats() is not neccessary to be invoked. However,
previous code does not unset the callback, so the callback is still
invoked and it makes segmentation fault error by accessing invalid
pointer. To resolve this issue, this patch makes the code unset the
callback in tts_core_deinitialize(). And also this patch adds null
checker in the callback. Thus, invalid pointer access will not occur
through this patch.

Change-Id: I703e0a0e3cbc7d548e84b274609f27d9442d8537
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
client/tts_core.c