Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
7f0acedf
Kaydet (Commit)
7f0acedf
authored
Eki 03, 2013
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
CID#441342 potential resource leak
Change-Id: Ia39e8c53427347088aa8d58ae1220950f191cd91
üst
df60b2f7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
ucbstorage.cxx
sot/source/sdstor/ucbstorage.cxx
+3
-6
No files found.
sot/source/sdstor/ucbstorage.cxx
Dosyayı görüntüle @
7f0acedf
...
@@ -43,6 +43,7 @@
...
@@ -43,6 +43,7 @@
#include <com/sun/star/packages/manifest/ManifestReader.hpp>
#include <com/sun/star/packages/manifest/ManifestReader.hpp>
#include <com/sun/star/ucb/InteractiveIOException.hpp>
#include <com/sun/star/ucb/InteractiveIOException.hpp>
#include <boost/scoped_ptr.hpp>
#include <rtl/digest.h>
#include <rtl/digest.h>
#include <tools/ref.hxx>
#include <tools/ref.hxx>
#include <tools/debug.hxx>
#include <tools/debug.hxx>
...
@@ -2139,15 +2140,15 @@ sal_Int16 UCBStorage_Impl::Commit()
...
@@ -2139,15 +2140,15 @@ sal_Int16 UCBStorage_Impl::Commit()
{
{
UCBStorageElement_Impl
*
pElement
=
m_aChildrenList
[
i
];
UCBStorageElement_Impl
*
pElement
=
m_aChildrenList
[
i
];
::
ucbhelper
::
Content
*
pContent
=
pElement
->
GetContent
();
::
ucbhelper
::
Content
*
pContent
=
pElement
->
GetContent
();
boo
l
bDeleteContent
=
false
;
boo
st
::
scoped_ptr
<
::
ucbhelper
::
Content
>
xDeleteContent
;
if
(
!
pContent
&&
pElement
->
IsModified
()
)
if
(
!
pContent
&&
pElement
->
IsModified
()
)
{
{
// if the element has never been opened, no content has been created until now
// if the element has never been opened, no content has been created until now
bDeleteContent
=
true
;
// remember to delete it later
OUString
aName
(
m_aURL
);
OUString
aName
(
m_aURL
);
aName
+=
"/"
;
aName
+=
"/"
;
aName
+=
pElement
->
m_aOriginalName
;
aName
+=
pElement
->
m_aOriginalName
;
pContent
=
new
::
ucbhelper
::
Content
(
aName
,
Reference
<
::
com
::
sun
::
star
::
ucb
::
XCommandEnvironment
>
(),
comphelper
::
getProcessComponentContext
()
);
pContent
=
new
::
ucbhelper
::
Content
(
aName
,
Reference
<
::
com
::
sun
::
star
::
ucb
::
XCommandEnvironment
>
(),
comphelper
::
getProcessComponentContext
()
);
xDeleteContent
.
reset
(
pContent
);
// delete it later on exit scope
}
}
if
(
pElement
->
m_bIsRemoved
)
if
(
pElement
->
m_bIsRemoved
)
...
@@ -2220,10 +2221,6 @@ sal_Int16 UCBStorage_Impl::Commit()
...
@@ -2220,10 +2221,6 @@ sal_Int16 UCBStorage_Impl::Commit()
nRet
=
nLocalRet
;
nRet
=
nLocalRet
;
}
}
if
(
bDeleteContent
)
// content was created inside the loop
delete
pContent
;
if
(
nRet
==
COMMIT_RESULT_FAILURE
)
if
(
nRet
==
COMMIT_RESULT_FAILURE
)
break
;
break
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment