mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-19 09:01:15 +02:00
Fixes per Vigilant Sentry (http://www.vigilantsw.com/)
* Fix memory leaks. * Add comments about initializations and checking for successful results. * Add checks for NULL deref. * Consistency in "TODO" vs "TO-DO" comments!
This commit is contained in:
@@ -225,6 +225,7 @@ WaveTrack* ODWaveTrackTaskQueue::GetWaveTrack(size_t x)
|
||||
{
|
||||
WaveTrack* ret = NULL;
|
||||
mTracksMutex.Lock();
|
||||
// FIX-ME: x is unsigned so there's no point in checking that it's >= 0.
|
||||
if(x>=0&&x<mTracks.size())
|
||||
ret = mTracks[x];
|
||||
mTracksMutex.Unlock();
|
||||
@@ -256,6 +257,7 @@ ODTask* ODWaveTrackTaskQueue::GetTask(size_t x)
|
||||
{
|
||||
ODTask* ret = NULL;
|
||||
mTasksMutex.Lock();
|
||||
// FIX-ME: x is unsigned so there's no point in checking that it's >= 0.
|
||||
if(x>=0&&x<mTasks.size())
|
||||
ret = mTasks[x];
|
||||
mTasksMutex.Unlock();
|
||||
|
Reference in New Issue
Block a user