aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJacek Antonelli2008-12-06 12:00:05 -0600
committerJacek Antonelli2008-12-06 12:00:05 -0600
commit20c9dc0a1da2cd57716796ae97adcd4d018213da (patch)
tree464b8c43a257ab8ab46bd98c872a4b29e5981d00
parentVWR-9400 (memleak whenever an LSL script is uploaded) (diff)
downloadmeta-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.
-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 f9baad6..d6a7ee1 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,6 +1,11 @@
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: 3 * linden/indra/llmessage/llhttpclient.cpp:
4 VWR-9400b (memleak whenever an LSL script is uploaded)
5 Patch by Henri Beauchamp.
6
7
8 * linden/indra/llmessage/llhttpclient.cpp:
4 VWR-9400 (memleak whenever an LSL script is uploaded) 9 VWR-9400 (memleak whenever an LSL script is uploaded)
5 Patch by Carjay McGinnis. 10 Patch by Carjay McGinnis.
6 11
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 }