aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2026-09-14 22:33:21 +0200
committersaturneric <[email protected]>2026-09-14 22:33:21 +0200
commitc4aa2bc64c145f57adfec20a97a6a709f1935517 (patch)
tree94d87c594827b4f6f172e0ba522b0a52810459bb /src
parentfix(network): use explicit UTF-8 user agent conversion (diff)
downloadmodules-c4aa2bc64c145f57adfec20a97a6a709f1935517.tar.gz
modules-c4aa2bc64c145f57adfec20a97a6a709f1935517.zip
fix(email): free verification error string
- release error_string on successful region verification - prevent a per-region memory leak confirmed by ASan
Diffstat (limited to 'src')
-rw-r--r--src/m_email/EMailBasicGpgOpera.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/m_email/EMailBasicGpgOpera.cpp b/src/m_email/EMailBasicGpgOpera.cpp
index 92001d3..c8bfeca 100644
--- a/src/m_email/EMailBasicGpgOpera.cpp
+++ b/src/m_email/EMailBasicGpgOpera.cpp
@@ -1180,6 +1180,12 @@ auto VerifyOneRegion(int channel, const QByteArray& raw,
const auto err = s->gpgme_error;
const auto capsule_id = UDUP(s->capsule_id);
+ // Reclaimed on the SUCCESS path too. Every other result site in this file
+ // takes error_string; this one did not, so a successful verification leaked
+ // it once per signed region -- confirmed by ASan, not by inspection. The
+ // opaque-result-handle rework removes the whole class by leaving no
+ // per-field free to forget; until then this is the missing line.
+ UDUP(s->error_string);
GFGpgFreeResult(s->gpgme_verify_result);
GFFreeMemory(s);