diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-12-17 16:50:47 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-12-17 16:51:17 +0100 |
commit | d1385731031fc30cfc2c182279ba5d4feb497328 (patch) | |
tree | 65e54aa6712e8bf78a5a49fca0f65d80fa3d6383 /include | |
parent | c535f115efddc5195d162517ad67ed013229de57 (diff) |
Avoid memory leaks
...when exceptions get thrown while a context owns an rewind map
Change-Id: I90d26caa57ef2ff508e6eae05ddbc62cdb3f01ea
Diffstat (limited to 'include')
-rw-r--r-- | include/xmloff/xmlictxt.hxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/xmloff/xmlictxt.hxx b/include/xmloff/xmlictxt.hxx index 325457c16918..16bb92ff1120 100644 --- a/include/xmloff/xmlictxt.hxx +++ b/include/xmloff/xmlictxt.hxx @@ -44,9 +44,9 @@ class XMLOFF_DLLPUBLIC SvXMLImportContext : public SvRefBase, SvXMLNamespaceMap *mpRewindMap; - SAL_DLLPRIVATE SvXMLNamespaceMap *GetRewindMap() const - { return mpRewindMap; } - SAL_DLLPRIVATE void SetRewindMap( SvXMLNamespaceMap *p ) { mpRewindMap = p; } + SAL_DLLPRIVATE SvXMLNamespaceMap *TakeRewindMap() + { auto p = mpRewindMap; mpRewindMap = nullptr; return p; } + SAL_DLLPRIVATE void PutRewindMap( SvXMLNamespaceMap *p ) { mpRewindMap = p; } protected: |