This is patch:
authorKent Mein <mein@cs.umn.edu>
Mon, 16 Mar 2009 17:02:19 +0000 (17:02 +0000)
committerKent Mein <mein@cs.umn.edu>
Mon, 16 Mar 2009 17:02:19 +0000 (17:02 +0000)
[#17974] two small fix for blender 2.48 (memory leak and uninitalized vars)
Submitted By:
Pavel Nemec (nemecp)

(changes delete to [] and sets to vars to NULL)

Kent

intern/opennl/superlu/get_perm_c.c
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp

index e255b4a76bdf6ff63d92762dbb4a7a83c23ab2ee..4c0ee95c4c64390bbde2106b2a7d6628b6a1e957 100644 (file)
@@ -366,6 +366,10 @@ get_perm_c(int ispec, SuperMatrix *A, int *perm_c)
     int *b_rowind, *dhead, *qsize, *llist, *marker;
     double t, SuperLU_timer_();
     
+    /* make gcc happy */
+    b_rowind=NULL;
+    b_colptr=NULL;
+    
     m = A->nrow;
     n = A->ncol;
 
index afee60c3192d249ce60c41cfde64718e6cb1a036..018c966ac6974e305da85a287b112e51cfdbd082 100644 (file)
@@ -246,7 +246,7 @@ static void get_filename(int argc, char **argv, char *filename)
                if (BLI_exists(gamefile))
                        BLI_strncpy(filename, gamefile, FILE_MAXDIR + FILE_MAXFILE);
 
-               delete gamefile;
+               delete [] gamefile;
        }
        
 #else