From f9f4fa29722e9086e19f59dbaff42f31c150f554 Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Thu, 2 Sep 2010 15:56:12 +0000 Subject: [PATCH] Fixed potential memory leak --- DataStructures/NNGrid.h | 1 + 1 file changed, 1 insertion(+) diff --git a/DataStructures/NNGrid.h b/DataStructures/NNGrid.h index 05e6e7e19..d48c4ded9 100644 --- a/DataStructures/NNGrid.h +++ b/DataStructures/NNGrid.h @@ -517,6 +517,7 @@ private: assert(cellMap->find(fileIndex) != cellMap->end()); if(cellIndex[cellMap->find(fileIndex)->second] == UINT_MAX) { + delete cellMap; return; } unsigned position = cellIndex[cellMap->find(fileIndex)->second] + 32*32*sizeof(unsigned) ;