[SCM] OCE packaging branch, debian, updated. debian/0.11-1

tpaviot tpaviot at gmail.com
Thu Dec 13 19:16:41 UTC 2012


The following commit has been merged in the debian branch:
commit a6e305b4552956b021e9e6130cb20acc8ba857c3
Author: tpaviot <tpaviot at gmail.com>
Date:   Tue Nov 20 09:23:29 2012 +0100

    [cppcheck-fix][mismatch-allocation-deallocation]
    
    Fix cppcheck-1.57 following issues :
    [src/OpenGl/OpenGl_ImageBox.cxx:349]: (error) Mismatching allocation and deallocation: base
    [src/OpenGl/OpenGl_ImageBox.cxx:350]: (error) Mismatching allocation and deallocation: rbuf
    [src/OpenGl/OpenGl_ImageBox.cxx:351]: (error) Mismatching allocation and deallocation: gbuf
    [src/OpenGl/OpenGl_ImageBox.cxx:352]: (error) Mismatching allocation and deallocation: bbuf
    [src/OpenGl/OpenGl_ImageBox.cxx:353]: (error) Mismatching allocation and deallocation: abuf

diff --git a/src/OpenGl/OpenGl_ImageBox.cxx b/src/OpenGl/OpenGl_ImageBox.cxx
index 5e8d59f..c4e3693 100644
--- a/src/OpenGl/OpenGl_ImageBox.cxx
+++ b/src/OpenGl/OpenGl_ImageBox.cxx
@@ -346,11 +346,11 @@ read_texture(char *name, int *width, int *height, int *components) {
   abuf = new unsigned char[image->xsize];
   if(!base || !rbuf || !gbuf || !bbuf)
   {  
-    free(base);
-    free(rbuf);
-    free(gbuf);
-    free(bbuf);
-    free(abuf);
+    delete [] base;
+    delete [] rbuf;
+    delete [] gbuf;
+    delete [] bbuf;
+    delete [] abuf;
     return NULL;
   }
   lptr = base;

-- 
OCE packaging



More information about the debian-science-commits mailing list