aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-05-11 13:21:40 +0000
committersaturneric <[email protected]>2024-05-11 13:21:40 +0000
commitb63e1cbf3308f6c3e1e9fd93511e6548eba194e7 (patch)
tree4f3066559d4a8c4c6a74240871f4d82034df97cb
parentfix: use qvector instead of qlist at qt5 env (diff)
downloadGpgFrontend-dev/2.1.3/qt5.tar.gz
GpgFrontend-dev/2.1.3/qt5.zip
fix: use gfalloc functions properlydev/2.1.3/qt5
-rw-r--r--src/module/mods/gpg_info/GnuPGInfoGatheringModule.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/module/mods/gpg_info/GnuPGInfoGatheringModule.cpp b/src/module/mods/gpg_info/GnuPGInfoGatheringModule.cpp
index 25bdc668..bf10ef3a 100644
--- a/src/module/mods/gpg_info/GnuPGInfoGatheringModule.cpp
+++ b/src/module/mods/gpg_info/GnuPGInfoGatheringModule.cpp
@@ -210,7 +210,9 @@ auto GFExecuteModule(GFModuleEvent *event) -> int {
continue;
}
- auto *context = new Context{gpgme_version, gpgconf_path, component_info};
+ auto *context = new (GFAllocateMemory(sizeof(Context)))
+ Context{gpgme_version, gpgconf_path, component_info};
+
const char **argv_0 =
static_cast<const char **>(GFAllocateMemory(sizeof(const char *) * 2));
argv_0[0] = GFModuleStrDup("--list-options"),
@@ -515,5 +517,6 @@ void GetGpgOptionInfos(void *data, int exit_code, const char *out,
options_infos.push_back(info);
}
+ context->~Context();
GFFreeMemory(context);
}