summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-03-12 15:35:29 +0100
committerMichael Stahl <mstahl@redhat.com>2015-03-12 17:28:50 +0100
commit2298c1a66380a0c91ea222d01259686641ab4c6c (patch)
tree92b581ca8b5e2eb781d304468a618bfe5f5949bc
parentsvx: PVS-Studio V603 The object was created but it is not being used (diff)
downloadcore-2298c1a66380a0c91ea222d01259686641ab4c6c.tar.gz
core-2298c1a66380a0c91ea222d01259686641ab4c6c.zip
sal: PVS-Studio V611 memory was allocated using 'new T[]' operator
... but was released using the 'delete' operator Change-Id: I67a4b9b8c60f7fddaeef4344ba472d331b3ca154
-rw-r--r--include/osl/profile.hxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/osl/profile.hxx b/include/osl/profile.hxx
index f14a09a3fbe1..661efe2b38c0 100644
--- a/include/osl/profile.hxx
+++ b/include/osl/profile.hxx
@@ -131,7 +131,7 @@ namespace osl {
pStrings[ nItems ] = NULL;
bool bRet =
osl_writeProfileIdent(profile, rSection.getStr(), rEntry.getStr(), nFirstId, pStrings, nValue );
- delete pStrings;
+ delete[] pStrings;
return bRet;
}
@@ -162,7 +162,7 @@ namespace osl {
size_t nLen;
for( n = 0; ( nLen = strlen( pBuf+n ) ); n += nLen+1 )
aEntries.push_back( rtl::OString( pBuf+n ) );
- delete pBuf;
+ delete[] pBuf;
}
return aEntries;
@@ -184,7 +184,7 @@ namespace osl {
size_t nLen;
for( n = 0; ( nLen = strlen( pBuf+n ) ); n += nLen+1 )
aSections.push_back( rtl::OString( pBuf+n ) );
- delete pBuf;
+ delete[] pBuf;
}
return aSections;