9af0d9
From 7777d261923e0f0c3bd9cb2b7f0c2ac81b83f2c3 Mon Sep 17 00:00:00 2001
9af0d9
From: Robbie Harwood <rharwood@redhat.com>
9af0d9
Date: Wed, 26 Aug 2020 13:36:50 -0400
9af0d9
Subject: [PATCH] Fix leak of mech OID in gssi_inquire_context()
9af0d9
9af0d9
The name it creates holds a copy of the OID, which we need to release.
9af0d9
9af0d9
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
9af0d9
(cherry picked from commit 482349fa6bd536471216a898713c83260c78c08d)
9af0d9
(cherry picked from commit ce271e38be223a9442efd406c9a8fa961930e35b)
9af0d9
---
9af0d9
 src/mechglue/gpp_import_and_canon_name.c | 2 ++
9af0d9
 1 file changed, 2 insertions(+)
9af0d9
9af0d9
diff --git a/src/mechglue/gpp_import_and_canon_name.c b/src/mechglue/gpp_import_and_canon_name.c
9af0d9
index 745be20..7d6829f 100644
9af0d9
--- a/src/mechglue/gpp_import_and_canon_name.c
9af0d9
+++ b/src/mechglue/gpp_import_and_canon_name.c
9af0d9
@@ -257,6 +257,8 @@ OM_uint32 gssi_release_name(OM_uint32 *minor_status,
9af0d9
         return GSS_S_BAD_NAME;
9af0d9
     }
9af0d9
 
9af0d9
+    (void)gss_release_oid(&rmin, &name->mech_type);
9af0d9
+
9af0d9
     rmaj = gpm_release_name(&rmin, &name->remote);
9af0d9
 
9af0d9
     if (name->local) {