diff options
| author | saturneric <[email protected]> | 2026-09-14 22:33:21 +0200 |
|---|---|---|
| committer | saturneric <[email protected]> | 2026-09-14 22:33:21 +0200 |
| commit | c4aa2bc64c145f57adfec20a97a6a709f1935517 (patch) | |
| tree | 94d87c594827b4f6f172e0ba522b0a52810459bb /src | |
| parent | fix(network): use explicit UTF-8 user agent conversion (diff) | |
| download | modules-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.cpp | 6 |
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); |
