aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/olm/qolmaccount.cpp5
-rw-r--r--lib/olm/qolmaccount.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/olm/qolmaccount.cpp b/lib/olm/qolmaccount.cpp
index 673f613b..a6a07962 100644
--- a/lib/olm/qolmaccount.cpp
+++ b/lib/olm/qolmaccount.cpp
@@ -66,6 +66,11 @@ QOlmAccount::QOlmAccount(OlmAccount *account)
: m_account(account)
{}
+QOlmAccount::~QOlmAccount()
+{
+ olm_clear_account(m_account);
+}
+
std::optional<QOlmAccount> QOlmAccount::create()
{
auto account = olm_account(new uint8_t[olm_account_size()]);
diff --git a/lib/olm/qolmaccount.h b/lib/olm/qolmaccount.h
index 219d7e48..268cd5d5 100644
--- a/lib/olm/qolmaccount.h
+++ b/lib/olm/qolmaccount.h
@@ -49,6 +49,8 @@ bool operator==(const IdentityKeys& lhs, const IdentityKeys& rhs);
class QOlmAccount
{
public:
+ ~QOlmAccount();
+
enum OlmAccountError {
BadAccountKey,
BadMessageKeyId,