mirror of https://github.com/odrling/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
370b986181
commit
82fca6e35f
|
@ -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 New Issue