summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2015-09-13 09:42:01 +0200
committerJulien Nabet <serval2412@yahoo.fr>2015-09-13 09:42:01 +0200
commit81d62c5f48f3bf341c4c7bdaef5a5ce5941f3e62 (patch)
tree49956a09ecb39cb8b4865cbeb8c93195ffc5fc6b
parent509b1adcef374cbf67817250547c69339dfee3d7 (diff)
cppcheck: Mismatching allocation and deallocation
+ Typo: excecptionTypeSizeArray->exceptionTypeSizeArray Change-Id: I6fac3bea1eba094e87717d20a08ec7cf6151e2df
-rw-r--r--bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
index d5d6d0e27606..106c20a075d1 100644
--- a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
@@ -612,7 +612,7 @@ RaiseInfo::RaiseInfo(typelib_TypeDescription * pTD)throw ()
// 2.Pass: Get the total needed memory for class ExceptionType
// (with embedded type_info) and keep the sizes for each instance
// is stored in allocated int array
- int *excecptionTypeSizeArray = new int[nLen];
+ int *exceptionTypeSizeArray = new int[nLen];
nLen = 0;
for (pCompTD = (typelib_CompoundTypeDescription*)pTD;
@@ -627,14 +627,14 @@ RaiseInfo::RaiseInfo(typelib_TypeDescription * pTD)throw ()
n++;
typeInfoLen = n*4;
}
- excecptionTypeSizeArray[nLen++] = typeInfoLen + sizeof(ExceptionType);
+ exceptionTypeSizeArray[nLen++] = typeInfoLen + sizeof(ExceptionType);
}
// Total ExceptionType related mem
int excTypeAddLen = 0;
for (int i = 0; i < nLen; i++)
{
- excTypeAddLen += excecptionTypeSizeArray[i];
+ excTypeAddLen += exceptionTypeSizeArray[i];
}
// Allocate mem for code and all dynamic data in one chunk to guarantee
@@ -686,7 +686,7 @@ RaiseInfo::RaiseInfo(typelib_TypeDescription * pTD)throw ()
// Next trampoline entry offset
pCodeOffset += codeSnippetSize;
// Next ExceptionType placement offset
- etMemOffset += excecptionTypeSizeArray[nPos - 1];
+ etMemOffset += exceptionTypeSizeArray[nPos - 1];
// Keep offset of addresses of ET for D-Tor call in ~RaiseInfo
types[nPos++]
@@ -696,7 +696,7 @@ RaiseInfo::RaiseInfo(typelib_TypeDescription * pTD)throw ()
assert(etMem + etMemOffset == pCode + totalSize);
// remove array
- delete excecptionTypeSizeArray;
+ delete[] excecptionTypeSizeArray;
}
RaiseInfo::~RaiseInfo() throw ()