Bug 1021932 - Free the buffer on failure in MediaBufferDecoder::AsyncDecodeMedia. r=padenot

This commit is contained in:
Andrew McCreight 2014-06-22 11:10:08 -07:00
parent 965c67e0f3
commit bee6f49645

View File

@ -450,6 +450,7 @@ MediaBufferDecoder::AsyncDecodeMedia(const char* aContentType, uint8_t* aBuffer,
new ReportResultTask(aDecodeJob,
&WebAudioDecodeJob::OnFailure,
WebAudioDecodeJob::UnknownContent);
JS_free(nullptr, aBuffer);
NS_DispatchToMainThread(event);
return;
}
@ -459,6 +460,7 @@ MediaBufferDecoder::AsyncDecodeMedia(const char* aContentType, uint8_t* aBuffer,
new ReportResultTask(aDecodeJob,
&WebAudioDecodeJob::OnFailure,
WebAudioDecodeJob::UnknownError);
JS_free(nullptr, aBuffer);
NS_DispatchToMainThread(event);
return;
}