- fix for memory leak in findFreeNavPolyIndex()
authorCampbell Barton <ideasman42@gmail.com>
Fri, 16 Sep 2011 14:02:44 +0000 (14:02 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 16 Sep 2011 14:02:44 +0000 (14:02 +0000)
- also correct own script for running cppcheck.

build_files/cmake/cmake_static_check_cppcheck.py
source/blender/editors/object/object_navmesh.cpp

index 4249537eca8fcbe73aca427139f7efbd13131549..6a69891c0aa4d6113234fc715d1b7087756110b4 100644 (file)
@@ -36,7 +36,9 @@ CHECKER_IGNORE_PREFIX = [
 CHECKER_BIN = "cppcheck"
 
 CHECKER_ARGS = [
-    "-I" + os.join(project_source_info.SORCE_DIR, "blender/extern/glew/include"),
+    # not sure why this is needed, but it is.
+    "-I" + os.path.join(project_source_info.SOURCE_DIR, "extern/glew/include"),
+
     #  "--check-config", # when includes are missing
     #  "--enable=all",  # if you want sixty hundred pedantic suggestions
     ]
index d0768d30236ecb6073fb74fb8af9648bc57c1924..ae97b40eb4923c960337ca431f95d07e269de4d6 100644 (file)
@@ -575,7 +575,7 @@ static int findFreeNavPolyIndex(EditMesh* em)
                else if (indices[i]>freeIdx)
                        break;
        }
-       delete indices;
+       delete [] indices;
        return freeIdx;
 }