diff options
author | Armin Le Grand <alg@apache.org> | 2012-06-26 13:30:33 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-05-02 11:02:43 +0100 |
commit | 52bd4ffaac9a48e4838f8e06d6b97fb1c1dd4bb2 (patch) | |
tree | f79c3fd4f9ccc9b4c76a278e936cb4a86832ccde /sw | |
parent | c18d8bd2d2ec5ba8dd9c43a99117aed82a919267 (diff) |
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
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/wrtww8.cxx | 3 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtww8.hxx | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 7753d3c1af6b..53308d862969 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 7d33f294aa89..3339bfe614a2 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; |