summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-03-27 10:11:51 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-03-27 13:30:40 +0200
commitedfa0562617c1330cc00923a5cf6e5916bacfed0 (patch)
treef397da4f7dbf2e137a73e7df931348867339c104 /sc/source/ui
parent3acc5a2383f5b0458e3caf1505fe6b8ad7dc3fb0 (diff)
ofz#7121 NamedDBs::insert takes ownership of its argument
at one point this was based on std::auto_ptr and didn't free its arg on failure Change-Id: I8aeed6876d80b7ebe4ebb5e2cfd12e00420bd207 Reviewed-on: https://gerrit.libreoffice.org/51932 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx1
1 files changed, 0 insertions, 1 deletions
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index 3a409e774d64..3a8a5d28de06 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -170,7 +170,6 @@ bool ScDBDocFunc::RenameDBRange( const OUString& rOld, const OUString& rNew )
bool bInserted = rDBs.insert(pNewData);
if (!bInserted) // error -> restore old state
{
- delete pNewData;
rDoc.SetDBCollection(std::move(pUndoColl)); // belongs to the document then
}