diff options
| author | Andre Heinecke <[email protected]> | 2018-07-04 10:15:05 +0000 | 
|---|---|---|
| committer | Andre Heinecke <[email protected]> | 2018-07-04 10:17:43 +0000 | 
| commit | 7d65dc2a5c4f32139a1b9b1f0bd375f7ab1c58f6 (patch) | |
| tree | be15553cb29d951ef32e2222abb45d5d8b576c7c /lang/cpp/src/decryptionresult.cpp | |
| parent | json: Add keylist mode locate (diff) | |
| download | gpgme-7d65dc2a5c4f32139a1b9b1f0bd375f7ab1c58f6.tar.gz gpgme-7d65dc2a5c4f32139a1b9b1f0bd375f7ab1c58f6.zip | |
cpp: Fix memory of DecryptionResult::symkeyAlgo
* lang/cpp/src/decryptionresult.cpp (Private, ~Private): strdup
the symkey algo.
Diffstat (limited to 'lang/cpp/src/decryptionresult.cpp')
| -rw-r--r-- | lang/cpp/src/decryptionresult.cpp | 7 | 
1 files changed, 7 insertions, 0 deletions
| diff --git a/lang/cpp/src/decryptionresult.cpp b/lang/cpp/src/decryptionresult.cpp index de589214..ea0a8a5c 100644 --- a/lang/cpp/src/decryptionresult.cpp +++ b/lang/cpp/src/decryptionresult.cpp @@ -51,6 +51,9 @@ public:          if (res.file_name) {              res.file_name = strdup(res.file_name);          } +        if (res.symkey_algo) { +            res.symkey_algo = strdup(res.symkey_algo); +        }          //FIXME: copying gpgme_recipient_t objects invalidates the keyid member,          //thus we use _keyid for now (internal API)          for (gpgme_recipient_t r = res.recipients ; r ; r = r->next) { @@ -68,6 +71,10 @@ public:              std::free(res.file_name);          }          res.file_name = 0; +        if (res.symkey_algo) { +            std::free(res.symkey_algo); +        } +        res.symkey_algo = 0;      }      _gpgme_op_decrypt_result res; | 
