Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix a memory leak in DVDRingBuffer::GetChapterTimes()

  • Loading branch information...
commit 7268a9c7c1985ce2542eeab0c16de569b13171b6 1 parent 090f847
@stuartm stuartm authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 mythtv/libs/libmythtv/dvdringbuffer.cpp
View
4 mythtv/libs/libmythtv/dvdringbuffer.cpp
@@ -504,7 +504,9 @@ uint64_t DVDRingBuffer::GetChapterTimes(uint title)
for (uint i = 0; i < num - 1; i++)
chapters.append((chaps[i] + 45000) / 90000);
}
- delete chaps;
+ // Assigned via calloc, must be free'd not deleted
+ if (chaps)
+ free(chaps);
m_chapterMap.insert(title, chapters);
return (duration + 45000) / 90000;
}
Please sign in to comment.
Something went wrong with that request. Please try again.