[SCM] OCE packaging branch, upstream, updated. OCE-0.6.0-230-g17bea23
tpaviot
tpaviot at gmail.com
Fri Feb 24 18:50:37 UTC 2012
The following commit has been merged in the upstream branch:
commit d81f784befb6bf8683bbe425e9e29d09ec18b63b
Author: tpaviot <tpaviot at gmail.com>
Date: Fri Jan 13 05:33:57 2012 +0100
[cppcheck-error-fix][memory-leak]
[OpenGl/OpenGl_ImageBox.cxx:330]: (error) Memory leak: base
[OpenGl/OpenGl_ImageBox.cxx:330]: (error) Memory leak: rbuf
[OpenGl/OpenGl_ImageBox.cxx:330]: (error) Memory leak: gbuf
[OpenGl/OpenGl_ImageBox.cxx:330]: (error) Memory leak: bbuf
[math/math_FunctionRoots.cxx:254]: (error) Memory leak: ptrval
diff --git a/src/OpenGl/OpenGl_ImageBox.cxx b/src/OpenGl/OpenGl_ImageBox.cxx
index 7811904..8d1b888 100644
--- a/src/OpenGl/OpenGl_ImageBox.cxx
+++ b/src/OpenGl/OpenGl_ImageBox.cxx
@@ -326,6 +326,10 @@ read_texture(char *name, int *width, int *height, int *components) {
bbuf = (unsigned char *)malloc(image->xsize*sizeof(unsigned char));
abuf = (unsigned char *)malloc(image->xsize*sizeof(unsigned char));
if(!base || !rbuf || !gbuf || !bbuf)
+ free(base);
+ free(rbuf);
+ free(gbuf);
+ free(bbuf);
free(abuf);
return NULL;
lptr = base;
diff --git a/src/math/math_FunctionRoots.cxx b/src/math/math_FunctionRoots.cxx
index 374201a..120d6b5 100644
--- a/src/math/math_FunctionRoots.cxx
+++ b/src/math/math_FunctionRoots.cxx
@@ -251,6 +251,7 @@ math_FunctionRoots::math_FunctionRoots(math_FunctionWithDerivative& F,
if( Nvalid < N ) {
Done = Standard_False;
+ delete [] ptrval;
return;
}
--
OCE packaging
More information about the debian-science-commits
mailing list