|
|
aa181f |
From a23fd33ce8bdf4cdc4d2d00153d3bbf89f363475 Mon Sep 17 00:00:00 2001
|
|
|
aa181f |
From: Simo Sorce <simo@redhat.com>
|
|
|
aa181f |
Date: Thu, 27 Aug 2020 13:20:49 -0400
|
|
|
aa181f |
Subject: [PATCH] Use the correct function to free unused creds
|
|
|
aa181f |
|
|
|
aa181f |
Signed-off-by: Simo Sorce <simo@redhat.com>
|
|
|
aa181f |
Reviewed-by: Robbie Harwood <rharwood@redhat.com>
|
|
|
aa181f |
(cherry picked from commit a2ffd1230fd572d7fa9099af2365dfb7ac394d07)
|
|
|
aa181f |
(cherry picked from commit f77b75b7928a2c7813aebc8a1ec107d495627685)
|
|
|
aa181f |
---
|
|
|
aa181f |
src/mechglue/gpp_creds.c | 2 +-
|
|
|
aa181f |
src/mechglue/gpp_init_sec_context.c | 2 +-
|
|
|
aa181f |
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
aa181f |
|
|
|
aa181f |
diff --git a/src/mechglue/gpp_creds.c b/src/mechglue/gpp_creds.c
|
|
|
aa181f |
index e87da82..338fadd 100644
|
|
|
aa181f |
--- a/src/mechglue/gpp_creds.c
|
|
|
aa181f |
+++ b/src/mechglue/gpp_creds.c
|
|
|
aa181f |
@@ -895,7 +895,7 @@ done:
|
|
|
aa181f |
if (maj == GSS_S_COMPLETE) {
|
|
|
aa181f |
*cred_handle = (gss_cred_id_t)cred;
|
|
|
aa181f |
} else {
|
|
|
aa181f |
- free(cred);
|
|
|
aa181f |
+ (void)gpp_cred_handle_free(&min, cred);
|
|
|
aa181f |
}
|
|
|
aa181f |
(void)gss_release_buffer(&min, &wrap_token);
|
|
|
aa181f |
return maj;
|
|
|
aa181f |
diff --git a/src/mechglue/gpp_init_sec_context.c b/src/mechglue/gpp_init_sec_context.c
|
|
|
aa181f |
index 94d9b01..bb878df 100644
|
|
|
aa181f |
--- a/src/mechglue/gpp_init_sec_context.c
|
|
|
aa181f |
+++ b/src/mechglue/gpp_init_sec_context.c
|
|
|
aa181f |
@@ -215,7 +215,7 @@ done:
|
|
|
aa181f |
*context_handle = (gss_ctx_id_t)ctx_handle;
|
|
|
aa181f |
|
|
|
aa181f |
if (claimant_cred_handle == GSS_C_NO_CREDENTIAL) {
|
|
|
aa181f |
- free(cred_handle);
|
|
|
aa181f |
+ (void)gpp_cred_handle_free(&min, cred_handle);
|
|
|
aa181f |
}
|
|
|
aa181f |
return maj;
|
|
|
aa181f |
}
|