Bug 1160428 - Fix theoretical take picture memory leak uncovered by coverity. r=aosmond

This commit is contained in:
Roger Yang 2015-05-03 13:46:00 -04:00
parent afaaf613b7
commit a347201a38

View File

@ -365,9 +365,16 @@ DOMCameraControlListener::OnTakePictureComplete(const uint8_t* aData, uint32_t a
static_cast<uint64_t>(mLength),
mMimeType);
aDOMCameraControl->OnTakePictureComplete(picture);
mData = NULL;
}
protected:
virtual
~Callback()
{
free(mData);
}
uint8_t* mData;
uint32_t mLength;
nsString mMimeType;