Blame SOURCES/Avoid-leak-of-special-mechs-in-gss_mech_interposer.patch

9af0d9
From 87a1335a9618788f5d82de08ed0587feebe92c74 Mon Sep 17 00:00:00 2001
9af0d9
From: Robbie Harwood <rharwood@redhat.com>
9af0d9
Date: Fri, 31 Jul 2020 13:23:30 -0400
9af0d9
Subject: [PATCH] Avoid leak of special mechs in gss_mech_interposer()
9af0d9
9af0d9
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
9af0d9
(cherry picked from commit dc405df92173cceac2cafc09a70b1724bb2b97c8)
9af0d9
(cherry picked from commit 4b9e5f00d36d9b5c1f80835a989fa8865c045ff3)
9af0d9
---
9af0d9
 src/mechglue/gss_plugin.c | 4 +++-
9af0d9
 1 file changed, 3 insertions(+), 1 deletion(-)
9af0d9
9af0d9
diff --git a/src/mechglue/gss_plugin.c b/src/mechglue/gss_plugin.c
9af0d9
index d735537..8b799cf 100644
9af0d9
--- a/src/mechglue/gss_plugin.c
9af0d9
+++ b/src/mechglue/gss_plugin.c
9af0d9
@@ -76,6 +76,7 @@ gss_OID_set gss_mech_interposer(gss_OID mech_type)
9af0d9
     gss_OID_set interposed_mechs;
9af0d9
     OM_uint32 maj, min;
9af0d9
     char *envval;
9af0d9
+    gss_OID_set special_mechs;
9af0d9
 
9af0d9
     /* avoid looping in the gssproxy daemon by avoiding to interpose
9af0d9
      * any mechanism */
9af0d9
@@ -118,7 +119,8 @@ gss_OID_set gss_mech_interposer(gss_OID mech_type)
9af0d9
     }
9af0d9
 
9af0d9
     /* while there also initiaize special_mechs */
9af0d9
-    (void)gpp_special_available_mechs(interposed_mechs);
9af0d9
+    special_mechs = gpp_special_available_mechs(interposed_mechs);
9af0d9
+    (void)gss_release_oid_set(&min, &special_mechs);
9af0d9
 
9af0d9
 done:
9af0d9
     if (maj != 0) {