From 55020401d9139f318db713582e971516c09776bb Mon Sep 17 00:00:00 2001 From: Brian Cox Date: Fri, 25 Aug 2017 18:28:09 -0700 Subject: [PATCH] Fix a few simple leaks inside twtest; fix some file permissions that got set wrong in last commit --- src/core/displayencoder.cpp | 0 src/core/hashtable.h | 0 src/twparser/yylex.cpp | 0 src/twparser/yyparse.cpp | 0 src/twtest/crytpo_t.cpp | 2 ++ src/twtest/fspropdisplayer_t.cpp | 2 ++ src/twtest/keyfile_t.cpp | 3 ++- src/twtest/refcountobj_t.cpp | 0 8 files changed, 6 insertions(+), 1 deletion(-) mode change 100755 => 100644 src/core/displayencoder.cpp mode change 100755 => 100644 src/core/hashtable.h mode change 100755 => 100644 src/twparser/yylex.cpp mode change 100755 => 100644 src/twparser/yyparse.cpp mode change 100755 => 100644 src/twtest/refcountobj_t.cpp diff --git a/src/core/displayencoder.cpp b/src/core/displayencoder.cpp old mode 100755 new mode 100644 diff --git a/src/core/hashtable.h b/src/core/hashtable.h old mode 100755 new mode 100644 diff --git a/src/twparser/yylex.cpp b/src/twparser/yylex.cpp old mode 100755 new mode 100644 diff --git a/src/twparser/yyparse.cpp b/src/twparser/yyparse.cpp old mode 100755 new mode 100644 diff --git a/src/twtest/crytpo_t.cpp b/src/twtest/crytpo_t.cpp index cf4c565..5d83447 100644 --- a/src/twtest/crytpo_t.cpp +++ b/src/twtest/crytpo_t.cpp @@ -407,6 +407,8 @@ void TestCrypto() delete pPublic; delete pPrivate; + delete pPublic2; + delete pPrivate2; } } diff --git a/src/twtest/fspropdisplayer_t.cpp b/src/twtest/fspropdisplayer_t.cpp index 770fdf6..a654df0 100644 --- a/src/twtest/fspropdisplayer_t.cpp +++ b/src/twtest/fspropdisplayer_t.cpp @@ -127,6 +127,8 @@ void cTestFSPropDisplayer::Test() d.TraceDebug("\n"); } + delete pPD; + delete pPDNew; return; } diff --git a/src/twtest/keyfile_t.cpp b/src/twtest/keyfile_t.cpp index 4570363..656dc05 100644 --- a/src/twtest/keyfile_t.cpp +++ b/src/twtest/keyfile_t.cpp @@ -107,8 +107,9 @@ void TestKeyFile() elGamal.SetVerifying(keyfile2.GetPublicKey()); elGamal.ProcessBlock(ciphertext, recovered_text); - + TEST(memcmp(recovered_text, plaintext, elGamal.GetBlockSizePlain()) == 0); + delete [] pMem; } // save to and read from disk diff --git a/src/twtest/refcountobj_t.cpp b/src/twtest/refcountobj_t.cpp old mode 100755 new mode 100644