Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix freed memory use #38

Merged
1 commit merged into from
Jan 4, 2016
Merged

Fix freed memory use #38

1 commit merged into from
Jan 4, 2016

Conversation

pascal-brand38
Copy link
Contributor

The following code is wrong as shm->tee is unpredictable
because of the former free():
tee_shm_free(shm);
mutex_unlock(&shm->tee->lock);

It is fixed in
tee_shm_free(shm);
mutex_unlock(&tee->lock);

Signed-off-by: Pascal Brand [email protected]

@jenswi-linaro
Copy link
Contributor

Reviewed-by: Jens Wiklander <[email protected]>

The following code is wrong as shm->tee is unpredictable
because of the former free():
	tee_shm_free(shm);
	mutex_unlock(&shm->tee->lock);

It is fixed in
	tee_shm_free(shm);
	mutex_unlock(&tee->lock);

Reviewed-by: Jens Wiklander <[email protected]>
Signed-off-by: Pascal Brand <[email protected]>
@ghost ghost merged commit 443a6f7 into OP-TEE:master Jan 4, 2016
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants