From 42afde6273a20bac82773bb5053211018805243c Mon Sep 17 00:00:00 2001 From: grahamboree Date: Wed, 24 Dec 2014 15:29:47 -0500 Subject: [PATCH] Fixed potential memory leak when loading test case files. --- RecastDemo/Source/TestCase.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/RecastDemo/Source/TestCase.cpp b/RecastDemo/Source/TestCase.cpp index be72d24..a8e3e4d 100644 --- a/RecastDemo/Source/TestCase.cpp +++ b/RecastDemo/Source/TestCase.cpp @@ -110,6 +110,7 @@ bool TestCase::load(const char* filePath) fclose(fp); if (readLen != 1) { + delete[] buf; return false; }