diff options
author | saturneric <[email protected]> | 2023-12-14 12:39:48 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2023-12-14 12:39:48 +0000 |
commit | beafe53c1b8671d8e84f0546eb404597300448c7 (patch) | |
tree | f9b3e2d1f1c94c344fe3f9df919f4be2e56b4cae /src/core/function/gpg/GpgContext.cpp | |
parent | fix: slove some memory issues (diff) | |
download | GpgFrontend-beafe53c1b8671d8e84f0546eb404597300448c7.tar.gz GpgFrontend-beafe53c1b8671d8e84f0546eb404597300448c7.zip |
fix: slove issues on memory and add asan support for debug
Diffstat (limited to 'src/core/function/gpg/GpgContext.cpp')
-rw-r--r-- | src/core/function/gpg/GpgContext.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/function/gpg/GpgContext.cpp b/src/core/function/gpg/GpgContext.cpp index 20ccf70f..0477b00a 100644 --- a/src/core/function/gpg/GpgContext.cpp +++ b/src/core/function/gpg/GpgContext.cpp @@ -200,7 +200,7 @@ class GpgContext::Impl : public SingletonFunctionObject<GpgContext::Impl> { db_path_c_str = nullptr; } - auto err = gpgme_ctx_set_engine_info(ctx, GPGME_PROTOCOL_OpenPGP, + auto err = gpgme_ctx_set_engine_info(ctx, gpgme_get_protocol(ctx), app_path_c_str, db_path_c_str); assert(CheckGpgError(err) == GPG_ERR_NO_ERROR); @@ -297,11 +297,11 @@ class GpgContext::Impl : public SingletonFunctionObject<GpgContext::Impl> { assert(p_ctx != nullptr); ctx_ref_ = p_ctx; - // if (!common_ctx_initialize(ctx_ref_, args)) { - // return false; - // } + if (!common_ctx_initialize(ctx_ref_, args)) { + return false; + } - // gpgme_set_armor(ctx_ref_, 1); + gpgme_set_armor(ctx_ref_, 1); return true; } }; |