diff options
author | Jacek Antonelli | 2008-12-06 12:00:05 -0600 |
---|---|---|
committer | Jacek Antonelli | 2008-12-06 12:00:05 -0600 |
commit | 20c9dc0a1da2cd57716796ae97adcd4d018213da (patch) | |
tree | 464b8c43a257ab8ab46bd98c872a4b29e5981d00 /linden/indra/llmessage | |
parent | VWR-9400 (memleak whenever an LSL script is uploaded) (diff) | |
download | meta-impy-20c9dc0a1da2cd57716796ae97adcd4d018213da.zip meta-impy-20c9dc0a1da2cd57716796ae97adcd4d018213da.tar.gz meta-impy-20c9dc0a1da2cd57716796ae97adcd4d018213da.tar.bz2 meta-impy-20c9dc0a1da2cd57716796ae97adcd4d018213da.tar.xz |
VWR-9400-patch2 (memleak whenever an LSL script is uploaded)
Patch by Henri Beauchamp.
Diffstat (limited to 'linden/indra/llmessage')
-rw-r--r-- | linden/indra/llmessage/llhttpclient.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/linden/indra/llmessage/llhttpclient.cpp b/linden/indra/llmessage/llhttpclient.cpp index 6242bda..ef163fa 100644 --- a/linden/indra/llmessage/llhttpclient.cpp +++ b/linden/indra/llmessage/llhttpclient.cpp | |||
@@ -189,10 +189,9 @@ namespace | |||
189 | 189 | ||
190 | LLVFile vfile(gVFS, mUUID, mAssetType, LLVFile::READ); | 190 | LLVFile vfile(gVFS, mUUID, mAssetType, LLVFile::READ); |
191 | S32 fileSize = vfile.getSize(); | 191 | S32 fileSize = vfile.getSize(); |
192 | U8* fileBuffer; | 192 | std::vector<U8> fileBuffer(fileSize); |
193 | fileBuffer = new U8 [fileSize]; | 193 | vfile.read(&fileBuffer[0], fileSize); |
194 | vfile.read(fileBuffer, fileSize); | 194 | ostream.write((char*)&fileBuffer[0], fileSize); |
195 | ostream.write((char*)fileBuffer, fileSize); | ||
196 | eos = true; | 195 | eos = true; |
197 | return STATUS_DONE; | 196 | return STATUS_DONE; |
198 | } | 197 | } |