Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ac50cb0 authored by jitendrathakare's avatar jitendrathakare Committed by Gerrit - the friendly Code Review server
Browse files

qseecom : Clear client handle after unmap the resources



When unloading the app,reset all client members to NULL
to protect from accessing the memory after being freed.

Change-Id: I573b9c6fde03539522d2b04724a2246660c62518
Signed-off-by: default avatarjitendra thakare <jitendrathakare@codeaurora.org>
parent 4fb9bf65
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2676,7 +2676,8 @@ static int qseecom_unmap_ion_allocated_memory(struct qseecom_dev_handle *data)
	if (!IS_ERR_OR_NULL(data->client.ihandle)) {
		ion_unmap_kernel(qseecom.ion_clnt, data->client.ihandle);
		ion_free(qseecom.ion_clnt, data->client.ihandle);
		data->client.ihandle = NULL;
		memset((void *)&data->client,
			0, sizeof(struct qseecom_client_handle));
	}
	return ret;
}