mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-28 00:39:43 -05:00
Fix memory leak in SymmetricCipherStream.
This commit is contained in:
parent
f9abf2171b
commit
7063f5296a
@ -21,11 +21,12 @@ SymmetricCipherStream::SymmetricCipherStream(QIODevice* baseDevice, SymmetricCip
|
||||
SymmetricCipher::Mode mode, SymmetricCipher::Direction direction,
|
||||
const QByteArray& key, const QByteArray& iv)
|
||||
: LayeredStream(baseDevice)
|
||||
, m_cipher(new SymmetricCipher(algo, mode, direction, key, iv))
|
||||
, m_bufferPos(0)
|
||||
, m_bufferFilling(false)
|
||||
, m_error(false)
|
||||
{
|
||||
m_cipher = new SymmetricCipher(algo, mode, direction, key, iv);
|
||||
|
||||
}
|
||||
|
||||
SymmetricCipherStream::~SymmetricCipherStream()
|
||||
|
@ -19,6 +19,7 @@
|
||||
#define KEEPASSX_SYMMETRICCIPHERSTREAM_H
|
||||
|
||||
#include <QtCore/QByteArray>
|
||||
#include <QtCore/QScopedPointer>
|
||||
|
||||
#include "crypto/SymmetricCipher.h"
|
||||
#include "streams/LayeredStream.h"
|
||||
@ -42,7 +43,7 @@ private:
|
||||
bool readBlock();
|
||||
bool writeBlock();
|
||||
|
||||
SymmetricCipher* m_cipher;
|
||||
const QScopedPointer<SymmetricCipher> m_cipher;
|
||||
QByteArray m_buffer;
|
||||
int m_bufferPos;
|
||||
bool m_bufferFilling;
|
||||
|
Loading…
Reference in New Issue
Block a user