From 4f3b20e6fd8068e11b9a319f4f1fc6329221cb13 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Wed, 21 Apr 2010 23:47:50 +0000 Subject: [PATCH] Fix a memory leak in get_creds.c's try_fallback_realm() git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23920 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/get_creds.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/krb5/krb/get_creds.c b/src/lib/krb5/krb/get_creds.c index 36624af1f..6099c6d91 100644 --- a/src/lib/krb5/krb/get_creds.c +++ b/src/lib/krb5/krb/get_creds.c @@ -496,8 +496,10 @@ try_fallback_realm(krb5_context context, krb5_tkt_creds_context ctx) return code; /* Give up if the fallback realm isn't any different. */ - if (data_eq_string(ctx->server->realm, hrealms[0])) + if (data_eq_string(ctx->server->realm, hrealms[0])) { + krb5_free_host_realm(context, hrealms); return ctx->reply_code; + } /* Rewrite server->realm to be the fallback realm. */ krb5_free_data_contents(context, &ctx->server->realm); -- 2.26.2