summaryrefslogtreecommitdiff
path: root/src/krb5_plugin
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-05-07 15:42:29 +0200
committerStephen Gallagher <sgallagh@redhat.com>2012-05-07 14:35:49 -0400
commit06ca37517d873ff240422c4c004d97e1d067af14 (patch)
tree7280ee9ba13af5e41b860a2b06ad640a8a6ec335 /src/krb5_plugin
parent4627cf4d8a949d1d7b4a9b24f9ad3b9a06d5b5bc (diff)
downloadsssd-06ca37517d873ff240422c4c004d97e1d067af14.tar.gz
sssd-06ca37517d873ff240422c4c004d97e1d067af14.tar.bz2
sssd-06ca37517d873ff240422c4c004d97e1d067af14.zip
krb5 locator: Do not leak addrinfo
Diffstat (limited to 'src/krb5_plugin')
-rw-r--r--src/krb5_plugin/sssd_krb5_locator_plugin.c2
1 files changed, 2 insertions, 0 deletions
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;
}