lib/gpg: Switch to GLib autocleanups for gpgme types
Prep for dropping `GLNX_DEFINE_CLEANUP_FUNCTION` from libglnx in favor of using GLib's `G_DEFINE_AUTO_CLEANUP_FREE_FUNC()`. Closes: #1042 Approved by: jlebon
This commit is contained in:
1 parent
6347c0fb88
commit
ded6417aee
4 files changed
+9
-11
No files matched your search
@@ -95,8 +95,8 @@ _ostree_gpg_verifier_check_signature (OstreeGpgVerifier *self,
|
||||
{
|
||||
GLNX_AUTO_PREFIX_ERROR("GPG", error);
|
||||
gpgme_error_t gpg_error = 0;
|
||||
ot_auto_gpgme_data gpgme_data_t data_buffer = NULL;
|
||||
ot_auto_gpgme_data gpgme_data_t signature_buffer = NULL;
|
||||
g_auto(gpgme_data_t) data_buffer = NULL;
|
||||
g_auto(gpgme_data_t) signature_buffer = NULL;
|
||||
g_autofree char *tmp_dir = NULL;
|
||||
g_autoptr(GOutputStream) target_stream = NULL;
|
||||
OstreeGpgVerifyResult *result = NULL;
|
||||
@@ -165,7 +165,7 @@ _ostree_gpg_verifier_check_signature (OstreeGpgVerifier *self,
|
||||
{
|
||||
const char *path = self->key_ascii_files->pdata[i];
|
||||
glnx_fd_close int fd = -1;
|
||||
ot_auto_gpgme_data gpgme_data_t kdata = NULL;
|
||||
g_auto(gpgme_data_t) kdata = NULL;
|
||||
|
||||
if (!glnx_openat_rdonly (AT_FDCWD, path, TRUE, &fd, error))
|
||||
goto out;
|
||||
|
||||
@@ -1331,9 +1331,9 @@ ostree_repo_remote_gpg_import (OstreeRepo *self,
|
||||
GError **error)
|
||||
{
|
||||
OstreeRemote *remote;
|
||||
ot_auto_gpgme_ctx gpgme_ctx_t source_context = NULL;
|
||||
ot_auto_gpgme_ctx gpgme_ctx_t target_context = NULL;
|
||||
ot_auto_gpgme_data gpgme_data_t data_buffer = NULL;
|
||||
g_auto(gpgme_ctx_t) source_context = NULL;
|
||||
g_auto(gpgme_ctx_t) target_context = NULL;
|
||||
g_auto(gpgme_data_t) data_buffer = NULL;
|
||||
gpgme_import_result_t import_result;
|
||||
gpgme_import_status_t import_status;
|
||||
g_autofree char *source_tmp_dir = NULL;
|
||||
|
||||
Reference in new issue
Block a user