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

Skip to content
Commit 7fe55efb authored by Azhar Shaikh's avatar Azhar Shaikh Committed by Gerrit - the friendly Code Review server
Browse files

USB: android: Fix memory leak in mass_storage_function_init()



mass_storage_function_init() calls fsg_common_init() which allocates
memory to fsg buffers only once during bootup. This memory is never
freed, which results in a memory leak. The reference count is
incremented in mass_storage_function_init() and in fsg_bind_config().
The count incremented in bind_config is decremented in fsg_unbind().
Free this memory and also decrement the reference count in
mass_storage_function_cleanup() which will be called during gadget unbind.

Change-Id: I51e8d062471540df01bcb3122195711bbaffe455
Signed-off-by: default avatarAzhar Shaikh <azhars@codeaurora.org>
parent adb420b2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment