diff options
author | Jacek Antonelli | 2008-12-06 11:53:58 -0600 |
---|---|---|
committer | Jacek Antonelli | 2008-12-06 11:53:58 -0600 |
commit | 6718a49a75c861336d272082b1af46b5910f89ad (patch) | |
tree | 328a195a2e7bed3fa686e7008f11e4a59fad2ad5 /linden/indra/llmessage/llhttpclient.cpp | |
parent | VWR-10837 (use delete [] in LLImageTGA) (diff) | |
download | meta-impy-6718a49a75c861336d272082b1af46b5910f89ad.zip meta-impy-6718a49a75c861336d272082b1af46b5910f89ad.tar.gz meta-impy-6718a49a75c861336d272082b1af46b5910f89ad.tar.bz2 meta-impy-6718a49a75c861336d272082b1af46b5910f89ad.tar.xz |
VWR-9400 (memleak whenever an LSL script is uploaded)
Patch by Carjay McGinnis.
Diffstat (limited to '')
-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 fc2612f..6242bda 100644 --- a/linden/indra/llmessage/llhttpclient.cpp +++ b/linden/indra/llmessage/llhttpclient.cpp | |||
@@ -160,10 +160,9 @@ namespace | |||
160 | fstream.seekg(0, std::ios::end); | 160 | fstream.seekg(0, std::ios::end); |
161 | U32 fileSize = fstream.tellg(); | 161 | U32 fileSize = fstream.tellg(); |
162 | fstream.seekg(0, std::ios::beg); | 162 | fstream.seekg(0, std::ios::beg); |
163 | char* fileBuffer; | 163 | std::vector<char> fileBuffer(fileSize); |
164 | fileBuffer = new char [fileSize]; | 164 | fstream.read(&fileBuffer[0], fileSize); |
165 | fstream.read(fileBuffer, fileSize); | 165 | ostream.write(&fileBuffer[0], fileSize); |
166 | ostream.write(fileBuffer, fileSize); | ||
167 | fstream.close(); | 166 | fstream.close(); |
168 | eos = true; | 167 | eos = true; |
169 | return STATUS_DONE; | 168 | return STATUS_DONE; |