]> git.sesse.net Git - freerainbowtables/blobdiff - Common/rt api/MemoryPool.cpp
Merge branch 'master' of git@gitorious.org:freerainbowtables-applications/freerainbow...
[freerainbowtables] / Common / rt api / MemoryPool.cpp
index 4c8d5c98eeb810e7d06ac81ad017bf8ef12d5e61..a6745073f0e97e9953c510280ac32b405106de2f 100644 (file)
@@ -1,8 +1,28 @@
 /*
-   RainbowCrack - a general propose implementation of Philippe Oechslin's faster time-memory trade-off technique.
-
-   Copyright (C) Zhu Shuanglei <shuanglei@hotmail.com>
-*/
+ * freerainbowtables is a project for generating, distributing, and using
+ * perfect rainbow tables
+ *
+ * Copyright (C) Zhu Shuanglei <shuanglei@hotmail.com>
+ * Copyright Martin Westergaard Jørgensen <martinwj2005@gmail.com>
+ * Copyright 2009, 2010 Daniël Niggebrugge <niggebrugge@fox-it.com>
+ * Copyright 2009, 2010 James Nobis <frt@quelrod.net>
+ * Copyright 2010 uroskn
+ *
+ * This file is part of freerainbowtables.
+ *
+ * freerainbowtables is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * freerainbowtables is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with freerainbowtables.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #include "MemoryPool.h"
 #include "Public.h"
@@ -29,7 +49,7 @@ CMemoryPool::~CMemoryPool()
 #ifdef _MEMORYDEBUG
                printf("Freeing %i bytes of memory\n", m_nMemSize);
 #endif 
-               delete m_pMem;
+               delete [] m_pMem;
                m_pMem = NULL;
                m_nMemSize = 0;
        }
@@ -54,7 +74,7 @@ unsigned char* CMemoryPool::Allocate(unsigned int nFileLen, unsigned int& nAlloc
 #ifdef _MEMORYDEBUG
                printf("Freeing %i bytes of memory\n", m_nMemSize);
 #endif 
-               delete m_pMem;
+               delete [] m_pMem;
                m_pMem = NULL;
                m_nMemSize = 0;
        }