sw/source/filter/ww8/wrtww8.cxx | 3 ++- sw/source/filter/ww8/wrtww8.hxx | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-)
New commits: commit 52bd4ffaac9a48e4838f8e06d6b97fb1c1dd4bb2 Author: Armin Le Grand <a...@apache.org> Date: Tue Jun 26 13:30:33 2012 +0000 Resolves: #120098# Memoryleak fixed at escher sw export remember and destroy the used stream. Found by: Chao Huang Patch by: Chao Huang Review by: alg (cherry picked from commit 9914b3172fd4e3867693e5e63c8085dd66f18b5f) Conflicts: sw/source/filter/ww8/wrtww8.cxx Change-Id: I5bccdd71312f32f861291fc600396dc111fc11c7 diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 7753d3c..53308d8 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -2743,7 +2743,8 @@ void WW8Export::WriteFkpPlcUsw() the existence of an ObjectPool dir is necessary for triggering some magic. cmc */ - GetWriter().GetStorage().OpenSotStorage(OUString(SL::aObjectPool), + // avoid memory leak #i120098#, the unnamed obj will be released in destructor. + xEscherStg = GetWriter().GetStorage().OpenSotStorage(OUString(SL::aObjectPool), STREAM_READWRITE | STREAM_SHARE_DENYALL); } diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index 7d33f29..3339bfe 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -923,6 +923,9 @@ protected: SwWW8Writer *m_pWriter; ///< Pointer to the writer WW8AttributeOutput *m_pAttrOutput; ///< Converting attributes to stream data +private: + SvStorageRef xEscherStg; /// memory leak #i120098#, to hold the reference to unnamed SotStorage obj + public: /// Access to the attribute output class. virtual AttributeOutputBase& AttrOutput() const; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits