forked from mia/Aegisub
* Fixed a mismatched new[]/delete
* Fixed a memory leak that would occur when loading subtitles from a matroska file Originally committed to SVN as r2924.
This commit is contained in:
parent
ce15bc55bc
commit
1cc280216c
1 changed files with 2 additions and 1 deletions
|
@ -360,7 +360,7 @@ void MatroskaWrapper::GetSubtitles(AssFile *target) {
|
|||
memcpy(privData,trackInfo->CodecPrivate,privSize);
|
||||
privData[privSize] = 0;
|
||||
wxString privString(privData,wxConvUTF8);
|
||||
delete privData;
|
||||
delete[] privData;
|
||||
|
||||
// Load into file
|
||||
wxString group = _T("[Script Info]");
|
||||
|
@ -416,6 +416,7 @@ void MatroskaWrapper::GetSubtitles(AssFile *target) {
|
|||
fread(tmp,1,frameSize,input->fp);
|
||||
tmp[frameSize] = 0;
|
||||
wxString blockString(tmp,wxConvUTF8);
|
||||
delete[] tmp;
|
||||
|
||||
// Get start and end times
|
||||
//longlong timecodeScaleLow = timecodeScale / 100;
|
||||
|
|
Loading…
Reference in a new issue