Skip to content

Fix memory leak in dwc_xdci_core_init when core_handle is NULL #1

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

Merged
merged 1 commit into from
Nov 10, 2016

Conversation

ColinIanKing
Copy link

If core_handle is NULL then the error exit path leaks the previous
allocation of local_core_handle causing a memory leak. Instead,
move the null check on core_handle to before the memory allocation
to avoid this leak.

Signed-off-by: Colin Ian King [email protected]

If core_handle is NULL then the error exit path leaks the previous
allocation of local_core_handle causing a memory leak. Instead,
move the null check on core_handle to before the memory allocation
to avoid this leak.

Signed-off-by: Colin Ian King <[email protected]>
@jeremy-compostella jeremy-compostella merged commit ad0862a into intel:master Nov 10, 2016
jeremy-compostella added a commit that referenced this pull request Nov 10, 2016
git log --pretty=format:"%h %ad | %s%d [%an]" origin/android/master..remotes/origin/abt/sandbox/jcompost/efiwrapper-pr3:
  ad0862a Thu Nov 10 10:30:12 2016 +0100 | Merge pull request #1 from ColinIanKing/master (HEAD, origin/abt/sandbox/jcompost/efiwrapper-pr3, github/master, github/master) [Jérémy Compostella]
  e18d1ad Mon Nov 7 20:36:52 2016 +0000 | Fix memory leak in dwc_xdci_core_init when core_handle is NULL [Colin Ian King]

git diff --stat origin/android/master..remotes/origin/abt/sandbox/jcompost/efiwrapper-pr3:
  drivers/dw3/XdciDWC.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

Change-Id: Iac91941087b37b11ea7c598e4811db66c869310d
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-40038
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: https://android.intel.com:443/551290
xihua-chen pushed a commit that referenced this pull request Sep 11, 2019
Fix memory leak in dwc_xdci_core_init when core_handle is NULL
xihua-chen pushed a commit that referenced this pull request Sep 11, 2019
git log --pretty=format:"%h %ad | %s%d [%an]" origin/android/master..remotes/origin/abt/sandbox/jcompost/efiwrapper-pr3:
  ad0862a Thu Nov 10 10:30:12 2016 +0100 | Merge pull request #1 from ColinIanKing/master (HEAD, origin/abt/sandbox/jcompost/efiwrapper-pr3, github/master, github/master) [Jérémy Compostella]
  e18d1ad Mon Nov 7 20:36:52 2016 +0000 | Fix memory leak in dwc_xdci_core_init when core_handle is NULL [Colin Ian King]

git diff --stat origin/android/master..remotes/origin/abt/sandbox/jcompost/efiwrapper-pr3:
  drivers/dw3/XdciDWC.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

Change-Id: Iac91941087b37b11ea7c598e4811db66c869310d
Tracked-On: OAM-40038
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: 551290
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