diff options
author | Lynx Linden <lynx@lindenlab.com> | 2010-06-14 16:02:55 +0100 |
---|---|---|
committer | Lynx Linden <lynx@lindenlab.com> | 2010-06-14 16:02:55 +0100 |
commit | 1a190182ea657127fdf05eff892546087046da97 (patch) | |
tree | 31456da50c05e9575750e12722e2150a7673da2a /indra/llimage/llimagepng.cpp | |
parent | e79b9d9bab9c18c05cccbff1ae5869377b303560 (diff) |
EXT-7851 FIXED Memory leak in LLImagePNG::encode()
We were not freeing the temporary image buffer if the PNG encoding
failed. This probably doesn't happen very often, but it's good to plug
the leak all the same.
Diffstat (limited to 'indra/llimage/llimagepng.cpp')
-rw-r--r-- | indra/llimage/llimagepng.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/indra/llimage/llimagepng.cpp b/indra/llimage/llimagepng.cpp index b5de104e61..a6ab246a2c 100644 --- a/indra/llimage/llimagepng.cpp +++ b/indra/llimage/llimagepng.cpp @@ -135,6 +135,7 @@ BOOL LLImagePNG::encode(const LLImageRaw* raw_image, F32 encode_time) if (! pngWrapper.writePng(raw_image, mTmpWriteBuffer)) { setLastError(pngWrapper.getErrorMessage()); + delete[] mTmpWriteBuffer; return FALSE; } |