[SCM] OCE packaging branch, upstream, updated. OCE-0.6.0-230-g17bea23
tpaviot
tpaviot at gmail.com
Fri Feb 24 18:51:05 UTC 2012
The following commit has been merged in the upstream branch:
commit 0b844723c191f16a54e1143188a4708877472632
Author: tpaviot <tpaviot at gmail.com>
Date: Thu Feb 2 06:16:46 2012 +0100
Fix issue #246: add missing bracket to if clause
diff --git a/src/OSD/OSD_FontMgr.cxx b/src/OSD/OSD_FontMgr.cxx
index 231f6c5..047d061 100644
--- a/src/OSD/OSD_FontMgr.cxx
+++ b/src/OSD/OSD_FontMgr.cxx
@@ -165,9 +165,11 @@ void OSD_FontMgr::InitFontDataBase() {
Standard_Character *font_dir = new Standard_Character[ req_size + strlen("\\Fonts\\") + 1 ] ;
if( !strcpy( font_dir, windir_var ) )
+ {
delete [] windir_var;
delete [] font_dir;
return ;
+ }
if( !strcat( font_dir, "\\Fonts\\" ) )
return ;
diff --git a/src/OpenGl/OpenGl_ImageBox.cxx b/src/OpenGl/OpenGl_ImageBox.cxx
index 8d1b888..ae30bd9 100644
--- a/src/OpenGl/OpenGl_ImageBox.cxx
+++ b/src/OpenGl/OpenGl_ImageBox.cxx
@@ -326,12 +326,14 @@ 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;
for(y=0; y<image->ysize; y++) {
if(image->zsize>=4) {
diff --git a/src/OpenGl/OpenGl_filters.cxx b/src/OpenGl/OpenGl_filters.cxx
index dcd01e9..4b4fdbe 100644
--- a/src/OpenGl/OpenGl_filters.cxx
+++ b/src/OpenGl/OpenGl_filters.cxx
@@ -348,9 +348,11 @@ TglNamesetRemove( Tint num, Tint *set )
size = num, size %= LIST_GROW_SIZE, size++, size *= LIST_GROW_SIZE;
temp = new Tint[size];
if( !temp )
+ {
delete [] ptr;
delete [] temp;
return TFailure;
+ }
memcpy( temp, set, num*sizeof(Tint) );
/* sort new set */
diff --git a/src/OpenGl/OpenGl_text.cxx b/src/OpenGl/OpenGl_text.cxx
index 4bc32e7..1018c33 100644
--- a/src/OpenGl/OpenGl_text.cxx
+++ b/src/OpenGl/OpenGl_text.cxx
@@ -153,10 +153,11 @@ TextAdd( TSM_ELEM_DATA d, Tint n, cmn_key *k )
wchar_t *wstr = new wchar_t[i];
if( !wstr )
+ {
delete data;
delete [] wstr;
return TFailure;
-
+ }
data->attach_pt = *pt;
data->length = i;
//szv: instead of memcpy
--
OCE packaging
More information about the debian-science-commits
mailing list