author | erik <erik> | 2007-01-31 22:21:38 (UTC) |
---|---|---|
committer | erik <erik> | 2007-01-31 22:21:38 (UTC) |
commit | ed5fba8cdb27174427b2e7780508bafa05536ca1 (patch) (side-by-side diff) | |
tree | 9dca5bd75617c8f18ba066bbd90ef88dc2473d84 /core/multimedia/opieplayer/modplug/load_amf.cpp | |
parent | 9395cf2a65184e493714c699bb23b02ea31feef5 (diff) | |
download | opie-ed5fba8cdb27174427b2e7780508bafa05536ca1.zip opie-ed5fba8cdb27174427b2e7780508bafa05536ca1.tar.gz opie-ed5fba8cdb27174427b2e7780508bafa05536ca1.tar.bz2 |
A few files that have dynamically allocated arrays that are not properly
de-allocated (forgot to use []).
Diffstat (limited to 'core/multimedia/opieplayer/modplug/load_amf.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/modplug/load_amf.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/multimedia/opieplayer/modplug/load_amf.cpp b/core/multimedia/opieplayer/modplug/load_amf.cpp index 188b5f5..2cf131b 100644 --- a/core/multimedia/opieplayer/modplug/load_amf.cpp +++ b/core/multimedia/opieplayer/modplug/load_amf.cpp @@ -373,48 +373,48 @@ BOOL CSoundFile::ReadAMF(LPCBYTE lpStream, DWORD dwMemLength) { UINT nTrkSize = *(USHORT *)(lpStream+dwMemPos); nTrkSize += (UINT)lpStream[dwMemPos+2] << 16; if (dwMemPos + nTrkSize * 3 + 3 <= dwMemLength) { pTrackData[iTrack] = (BYTE *)(lpStream + dwMemPos); } dwMemPos += nTrkSize * 3 + 3; } // Create the patterns from the list of tracks for (UINT iPat=0; iPat<pfh->numorders; iPat++) { MODCOMMAND *p = AllocatePattern(PatternSize[iPat], m_nChannels); if (!p) break; Patterns[iPat] = p; for (UINT iChn=0; iChn<m_nChannels; iChn++) { UINT nTrack = ptracks[iPat][iChn]; if ((nTrack) && (nTrack <= pfh->numtracks)) { UINT realtrk = pTrackMap[nTrack-1]; if (realtrk) { realtrk--; if ((realtrk < realtrackcnt) && (pTrackData[realtrk])) { AMF_Unpack(p+iChn, pTrackData[realtrk], PatternSize[iPat], m_nChannels); } } } } } - delete pTrackData; + delete [] pTrackData; // Read Sample Data for (UINT iSeek=1; iSeek<=maxsampleseekpos; iSeek++) { if (dwMemPos >= dwMemLength) break; for (UINT iSmp=0; iSmp<m_nSamples; iSmp++) if (iSeek == sampleseekpos[iSmp]) { MODINSTRUMENT *pins = &Ins[iSmp+1]; dwMemPos += ReadSample(pins, RS_PCM8U, (LPCSTR)(lpStream+dwMemPos), dwMemLength-dwMemPos); break; } } return TRUE; } |