diff options
Diffstat (limited to 'indra/newview/lllandmarklist.cpp')
-rw-r--r-- | indra/newview/lllandmarklist.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/indra/newview/lllandmarklist.cpp b/indra/newview/lllandmarklist.cpp index e8cdcdfdd6..2f43b41042 100644 --- a/indra/newview/lllandmarklist.cpp +++ b/indra/newview/lllandmarklist.cpp @@ -89,11 +89,11 @@ void LLLandmarkList::processGetAssetReply( LLVFile file(vfs, uuid, type); S32 file_length = file.getSize(); - char* buffer = new char[ file_length + 1 ]; - file.read( (U8*)buffer, file_length); /*Flawfinder: ignore*/ + std::vector<char> buffer(file_length + 1); + file.read( (U8*)&buffer[0], file_length); buffer[ file_length ] = 0; - LLLandmark* landmark = LLLandmark::constructFromString(buffer); + LLLandmark* landmark = LLLandmark::constructFromString(&buffer[0]); if (landmark) { LLVector3d pos; @@ -111,8 +111,6 @@ void LLLandmarkList::processGetAssetReply( } gLandmarkList.mList[ uuid ] = landmark; } - - delete[] buffer; } else { |