Blame SOURCES/Use-the-correct-function-to-free-unused-creds.patch

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