qseecom: check if app is blocked when unloading app

When TA client crashes, qseecom_release() will be called to
unload this TA and release its allocated buffer. But if at the same
time, there is another client still waiting to check if this TA is
blocked, the TA should not be unloaded, otherwise the checking client
may access freed buffer. Thus, add a TA "check_block" flag to indicate
if a client is still checking TA's block state, and not to unload TA
if this flag is true.

Change-Id: I8bd4baae44d5e333cedb54048501efd4cff29a72
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
1 file changed