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

drivers/mmcsd: Handle the failure correctly in mmcsd_slotinitialize #4474

Merged
merged 1 commit into from
Sep 5, 2021

Conversation

xiaoxiang781216
Copy link
Contributor

Summary

1.Return -ENOMEM directly if kmm_malloc return NULL
2.Call nxsem_destroy if the initialization can't succeed

Impact

Fix the memory leak

Testing

Pass CI.

1.Return -ENOMEM directly if kmm_malloc return NULL
2.Call nxsem_destroy if the initialization can't succeed

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
@acassis acassis merged commit c1f9d2c into apache:master Sep 5, 2021
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