From d1df93584d898d43fb38276938b398a42d42c640 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Tue, 28 Apr 2009 04:30:03 +0000 Subject: [PATCH] Fix a memory leak in module_locate_server git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22284 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/locate_kdc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/krb5/os/locate_kdc.c b/src/lib/krb5/os/locate_kdc.c index 7326435fa..0dc385a6c 100644 --- a/src/lib/krb5/os/locate_kdc.c +++ b/src/lib/krb5/os/locate_kdc.c @@ -624,6 +624,7 @@ module_locate_server (krb5_context ctx, const krb5_data *realm, char *realmz; /* NUL-terminated realm */ int i; struct module_callback_data cbdata = { 0, }; + const char *msg; Tprintf("in module_locate_server\n"); cbdata.lp = addrlist; @@ -639,7 +640,8 @@ module_locate_server (krb5_context ctx, const krb5_data *realm, "service_locator", &ptrs, &ctx->err); if (code) { Tprintf("error looking up plugin symbols: %s\n", - krb5_get_error_message(ctx, code)); + (msg = krb5_get_error_message(ctx, code))); + krb5_free_error_message(ctx, msg); return KRB5_PLUGIN_NO_HANDLE; } -- 2.26.2