From 4fdc58664a86b480e7306dd84a73ff71a509a839 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Sat, 9 Oct 2010 11:46:53 +0000 Subject: [PATCH] Plug a memory leak in gss_indicate_mechs git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24447 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/gssapi/mechglue/g_initialize.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/gssapi/mechglue/g_initialize.c b/src/lib/gssapi/mechglue/g_initialize.c index 8f99a46c7..caeec9223 100644 --- a/src/lib/gssapi/mechglue/g_initialize.c +++ b/src/lib/gssapi/mechglue/g_initialize.c @@ -249,8 +249,10 @@ gss_OID_set *mechSet_out; * I'm copying it. */ *minorStatus = k5_mutex_lock(&g_mechSetLock); - if (*minorStatus) + if (*minorStatus) { + free(mechSet); return GSS_S_FAILURE; + } /* allocate space for the oid structures */ if ((mechSet->elements = -- 2.26.2