Assign handle after tts_create() success 34/261934/3
authorSuyeon Hwang <stom.hwang@samsung.com>
Thu, 29 Jul 2021 06:03:00 +0000 (15:03 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Fri, 30 Jul 2021 02:52:45 +0000 (11:52 +0900)
commit9fa4d13888c98d00b9f07b133e000873e643db8b
tree575eacc16ff0850689989790f64e6c79b000adc6
parent7ee0bc81ecb9e77c742205ab0a046386d96c1ff5
Assign handle after tts_create() success

Previous code assigns the new handle before all process of tts_create() is finished. So, if
some process failed, client can get garbage point as a output parameter. It might occur wrong
behavior. And also, wrong pointer is passed into tts_config module because output parameter is
directly used.

This patch makes temporary handle for processing tts_create(), and passes this handle after all
process of tts_create() is success. And also by this change, tts config module gets right pointer
of handle.

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