Bug 814341 - fix memory leak in Bluetooth, r=gyeh

This commit is contained in:
Eric Chou 2012-12-13 20:12:04 +08:00
parent be79d3253c
commit 14c2e5fa6b
3 changed files with 4 additions and 3 deletions

View File

@ -157,8 +157,8 @@ private:
*/
bool mWaitingForConfirmationFlag;
nsAutoPtr<uint8_t> mBodySegment;
nsAutoPtr<uint8_t> mReceivedDataBuffer;
nsAutoArrayPtr<uint8_t> mBodySegment;
nsAutoArrayPtr<uint8_t> mReceivedDataBuffer;
nsCOMPtr<nsIDOMBlob> mBlob;
nsCOMPtr<nsIThread> mReadFileThread;

View File

@ -118,6 +118,7 @@ ParseHeaders(const uint8_t* aHeaderStart,
uint8_t* content = new uint8_t[contentLength];
memcpy(content, ptr, contentLength);
aRetHandlerSet->AddHeader(new ObexHeader(headerId, contentLength, content));
delete [] content;
ptr += contentLength;
}

View File

@ -119,7 +119,7 @@ public:
ObexHeaderId mId;
int mDataLength;
nsAutoPtr<uint8_t> mData;
nsAutoArrayPtr<uint8_t> mData;
};
class ObexHeaderSet {