[SCM] OCE packaging branch, upstream, updated. OCE-0.6.0-230-g17bea23
tpaviot
tpaviot at gmail.com
Fri Feb 24 18:50:33 UTC 2012
The following commit has been merged in the upstream branch:
commit 21887e7f7a41b76867a906d24c78dba97512f509
Author: tpaviot <tpaviot at gmail.com>
Date: Fri Jan 13 05:24:55 2012 +0100
[cppcheck-warning-fix][mismatch-allocation-deallocation][Pawel]
Original post:
Hello,
the following variables in HLRBRep_InternalAlgo::HideSelected (lines 800-820 in OCCT 6.5.2):
Standard_Integer *Val = new Standard_Integer [nf+1];
Standard_Real *Size = new Standard_Real [nf+1];
Standard_Integer *Index = new Standard_Integer [nf+1];
are deleted (lines 918-920) the following way:
delete Val;
delete Size;
delete Index;
which I guess is wrong because the array delete operator should be used like in OCCT 6.5.1:
delete [] Val;
delete [] Size;
delete [] Index;
Pawel
diff --git a/src/HLRBRep/HLRBRep_InternalAlgo.cxx b/src/HLRBRep/HLRBRep_InternalAlgo.cxx
index 3390cc3..4543803 100644
--- a/src/HLRBRep/HLRBRep_InternalAlgo.cxx
+++ b/src/HLRBRep/HLRBRep_InternalAlgo.cxx
@@ -915,9 +915,9 @@ void HLRBRep_InternalAlgo::HideSelected (const Standard_Integer I,
}
}
- delete Val;
- delete Size;
- delete Index;
+ delete [] Val;
+ delete [] Size;
+ delete [] Index;
#ifdef DEB
if (myDebug) {
--
OCE packaging
More information about the debian-science-commits
mailing list