- 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 4249537..6a69891 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 d0768d3..ae97b40 100644 (file)
@@ -575,7 +575,7 @@ static int findFreeNavPolyIndex(EditMesh* em)
                else if (indices[i]>freeIdx)
                        break;
        }
-       delete indices;
+       delete [] indices;
        return freeIdx;
 }