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

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


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

    [cppcheck-fix][memory-leak]
    
    Fix cppcheck-1.57 issue :
    [src/AlienImage/AlienImage_GIFLZWDict.cxx:781]: (error) Memory leak: cht

diff --git a/src/AlienImage/AlienImage_GIFLZWDict.cxx b/src/AlienImage/AlienImage_GIFLZWDict.cxx
index 31040ed..44cea0b 100644
--- a/src/AlienImage/AlienImage_GIFLZWDict.cxx
+++ b/src/AlienImage/AlienImage_GIFLZWDict.cxx
@@ -778,8 +778,10 @@ static chash_table __fastcall ppm_computechash (
         
     chl = ( chist_list )MALLOC(  sizeof( struct chist_list_item )  );
 
-    if ( chl == NULL ) return ( chash_table )NULL;
-        
+    if ( chl == NULL ) {
+      ppm_freechash ( cht );
+      return ( chash_table )NULL;
+    }    
     chl -> ch.color = *pP;
     chl -> ch.value = 1;
     chl -> next     = cht[ hash ];

-- 
OCE packaging



More information about the debian-science-commits mailing list