aboutsummaryrefslogtreecommitdiffstats
path: root/src/modes
diff options
context:
space:
mode:
Diffstat (limited to 'src/modes')
-rw-r--r--src/modes/cbc/cbc.h4
-rw-r--r--src/modes/ecb/ecb.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/modes/cbc/cbc.h b/src/modes/cbc/cbc.h
index 3069d6cb5..238780067 100644
--- a/src/modes/cbc/cbc.h
+++ b/src/modes/cbc/cbc.h
@@ -20,6 +20,8 @@ class BOTAN_DLL CBC_Encryption : public BlockCipherMode
CBC_Encryption(BlockCipher*, const BlockCipherModePaddingMethod*);
CBC_Encryption(BlockCipher*, const BlockCipherModePaddingMethod*,
const SymmetricKey&, const InitializationVector&);
+
+ ~CBC_Encryption() { delete padder; }
private:
std::string name() const;
void write(const byte[], u32bit);
@@ -36,6 +38,8 @@ class BOTAN_DLL CBC_Decryption : public BlockCipherMode
CBC_Decryption(BlockCipher*, const BlockCipherModePaddingMethod*);
CBC_Decryption(BlockCipher*, const BlockCipherModePaddingMethod*,
const SymmetricKey&, const InitializationVector&);
+
+ ~CBC_Decryption() { delete padder; }
private:
std::string name() const;
void write(const byte[], u32bit);
diff --git a/src/modes/ecb/ecb.h b/src/modes/ecb/ecb.h
index d15d2f202..902713455 100644
--- a/src/modes/ecb/ecb.h
+++ b/src/modes/ecb/ecb.h
@@ -20,6 +20,7 @@ class BOTAN_DLL ECB : public BlockCipherMode
protected:
ECB(BlockCipher* ciph, const BlockCipherModePaddingMethod* pad) :
BlockCipherMode(ciph, "ECB", 0), padder(pad) {}
+ ~ECB() { delete padder; }
std::string name() const;
const BlockCipherModePaddingMethod* padder;