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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix memory leak #17346

Merged
merged 1 commit into from
Feb 9, 2020
Merged

Fix memory leak #17346

merged 1 commit into from
Feb 9, 2020

Conversation

Paxxi
Copy link
Member

@Paxxi Paxxi commented Feb 8, 2020

Description

Fixes a memory leak introduced with #17186 . I missed it but Coverity caught it 馃槃

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • None of the above (please explain below)

Checklist:

  • My code follows the Code Guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the Contributing document
  • I have added tests to cover my change
  • All new and existing tests passed

@Paxxi Paxxi added Type: Fix non-breaking change which fixes an issue Component: Video v19 Matrix labels Feb 8, 2020
@Paxxi Paxxi added this to the Matrix 19.0-alpha 1 milestone Feb 8, 2020
@fritsch
Copy link
Member

fritsch commented Feb 8, 2020

Thanks much.

Copy link
Contributor

@fuzzard fuzzard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disregard this first comment.

Also st is created with new, with no corresponding delete as well in that method. Worth doing the delete for that as well?
https://github.com/Paxxi/xbmc/blob/542470e4f8ebc5ae60d52306e8740e7404f03a60/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp#L1508

@Paxxi
Copy link
Member Author

Paxxi commented Feb 9, 2020

@fuzzard , check the line below. stream is a pointer to base class and st is a pointer to the real class, stream is always assigned st directly after it's created.

One new early return was added that didn't delete stream and that's what coverity caught

@fuzzard
Copy link
Contributor

fuzzard commented Feb 9, 2020

Sorry for the noise

@Paxxi Paxxi merged commit 341f990 into xbmc:master Feb 9, 2020
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Feb 17, 2020
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Feb 19, 2020
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Feb 26, 2020
Maven85 pushed a commit to Maven85/kodi that referenced this pull request May 5, 2020
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 4, 2020
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 5, 2020
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 6, 2020
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 7, 2020
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Video Type: Fix non-breaking change which fixes an issue v19 Matrix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants