diff options
-rw-r--r-- | ChangeLog.txt | 5 | ||||
-rw-r--r-- | linden/indra/llmessage/llhttpclient.cpp | 7 |
2 files changed, 8 insertions, 4 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt index 533bddd..f9baad6 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt | |||
@@ -1,5 +1,10 @@ | |||
1 | 2008-12-06 Jacek Antonelli <jacek.antonelli@gmail.com> | 1 | 2008-12-06 Jacek Antonelli <jacek.antonelli@gmail.com> |
2 | 2 | ||
3 | * linden/indra/llmessage/llhttpclient.cpp: | ||
4 | VWR-9400 (memleak whenever an LSL script is uploaded) | ||
5 | Patch by Carjay McGinnis. | ||
6 | |||
7 | |||
3 | * linden/indra/llimage/llimagetga.cpp: | 8 | * linden/indra/llimage/llimagetga.cpp: |
4 | VWR-10837 (use delete [] in LLImageTGA) | 9 | VWR-10837 (use delete [] in LLImageTGA) |
5 | Patch by Aleric Inglewood. | 10 | Patch by Aleric Inglewood. |
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; |