diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-19 15:05:00 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-19 18:10:11 +0000 |
commit | 8f85595371de1848c9eb85492f04eb0e2bfc9cf5 (patch) | |
tree | a5938324069feb5252b4c7b300042593ba71923c /include/xmloff | |
parent | 7b6ffbcc958410035adfd4ed1d4b97991dfb883c (diff) |
coverity#1343637 Double free
and
coverity#1343638 Double free
coverity#1343639 Double free
coverity#1343640 Double free
coverity#1343641 Double free
Change-Id: I8ce42f03d40fe514f73b3a7eabdb4f323b2239e6
Diffstat (limited to 'include/xmloff')
-rw-r--r-- | include/xmloff/xmlictxt.hxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/xmloff/xmlictxt.hxx b/include/xmloff/xmlictxt.hxx index 16bb92ff1120..9d180bd46171 100644 --- a/include/xmloff/xmlictxt.hxx +++ b/include/xmloff/xmlictxt.hxx @@ -28,6 +28,7 @@ #include <tools/ref.hxx> #include <rtl/ustring.hxx> #include <cppuhelper/implbase1.hxx> +#include <xmloff/nmspmap.hxx> class SvXMLNamespaceMap; class SvXMLImport; @@ -42,11 +43,10 @@ class XMLOFF_DLLPUBLIC SvXMLImportContext : public SvRefBase, sal_uInt16 mnPrefix; OUString maLocalName; - SvXMLNamespaceMap *mpRewindMap; + std::unique_ptr<SvXMLNamespaceMap> mxRewindMap; - SAL_DLLPRIVATE SvXMLNamespaceMap *TakeRewindMap() - { auto p = mpRewindMap; mpRewindMap = nullptr; return p; } - SAL_DLLPRIVATE void PutRewindMap( SvXMLNamespaceMap *p ) { mpRewindMap = p; } + SAL_DLLPRIVATE SvXMLNamespaceMap *TakeRewindMap() { return mxRewindMap.release(); } + SAL_DLLPRIVATE void PutRewindMap( SvXMLNamespaceMap *p ) { mxRewindMap.reset(p); } protected: |