qseecom: fix an app unloading issue when the app is blocked

Reset app_crash flag to make sure app entry is not freed when
there is another client still being blocked on the same app.

Change-Id: I25d236abc97e60fe8a4abbbc8c086291c764a9c1
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
This commit is contained in:
Zhen Kong 2017-10-13 14:01:48 -07:00 committed by Gerrit - the friendly Code Review server
parent 55cbbe6873
commit db3336d536

View file

@ -2612,6 +2612,8 @@ static int qseecom_unload_app(struct qseecom_dev_handle *data,
if (!strcmp((void *)ptr_app->app_name,
(void *)data->client.app_name)) {
found_app = true;
if (ptr_app->app_blocked)
app_crash = false;
if (app_crash || ptr_app->ref_cnt == 1)
unload = true;
break;