From 06ca37517d873ff240422c4c004d97e1d067af14 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Mon, 7 May 2012 15:42:29 +0200 Subject: krb5 locator: Do not leak addrinfo --- src/krb5_plugin/sssd_krb5_locator_plugin.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/krb5_plugin') diff --git a/src/krb5_plugin/sssd_krb5_locator_plugin.c b/src/krb5_plugin/sssd_krb5_locator_plugin.c index 8efbf4b0..7ecdb29b 100644 --- a/src/krb5_plugin/sssd_krb5_locator_plugin.c +++ b/src/krb5_plugin/sssd_krb5_locator_plugin.c @@ -378,6 +378,7 @@ krb5_error_code sssd_krb5_locator_lookup(void *private_data, ret = cbfunc(cbdata, socktype, ai->ai_addr); if (ret != 0) { PLUGIN_DEBUG(("cbfunc failed\n")); + freeaddrinfo(ai); return ret; } else { PLUGIN_DEBUG(("[%s] used\n", addr)); @@ -385,6 +386,7 @@ krb5_error_code sssd_krb5_locator_lookup(void *private_data, } else { PLUGIN_DEBUG(("[%s] NOT used\n", addr)); } + freeaddrinfo(ai); return 0; } -- cgit