aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJacek Antonelli2008-12-06 11:53:58 -0600
committerJacek Antonelli2008-12-06 11:53:58 -0600
commit6718a49a75c861336d272082b1af46b5910f89ad (patch)
tree328a195a2e7bed3fa686e7008f11e4a59fad2ad5
parentVWR-10837 (use delete [] in LLImageTGA) (diff)
downloadmeta-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.
-rw-r--r--ChangeLog.txt5
-rw-r--r--linden/indra/llmessage/llhttpclient.cpp7
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 @@
12008-12-06 Jacek Antonelli <jacek.antonelli@gmail.com> 12008-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;