krb5 commit: Fix memory leak in test authdata server
Greg Hudson
ghudson at mit.edu
Fri Feb 23 15:21:04 EST 2018
https://github.com/krb5/krb5/commit/d047fb82738a7c45e71aa5e532621e46d02fa13b
commit d047fb82738a7c45e71aa5e532621e46d02fa13b
Author: sashan <anedvedicky at gmail.com>
Date: Tue Feb 20 22:41:28 2018 +0100
Fix memory leak in test authdata server
greet_kdc_sign() must always free if_relevant.
src/plugins/authdata/greet_server/greet_auth.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/src/plugins/authdata/greet_server/greet_auth.c b/src/plugins/authdata/greet_server/greet_auth.c
index 1f1e9de..7ef8f66 100644
--- a/src/plugins/authdata/greet_server/greet_auth.c
+++ b/src/plugins/authdata/greet_server/greet_auth.c
@@ -83,10 +83,9 @@ greet_kdc_sign(krb5_context context,
if (code == 0) {
krb5_free_authdata(context, enc_tkt_reply->authorization_data);
enc_tkt_reply->authorization_data = tkt_authdata;
- } else {
- krb5_free_authdata(context, if_relevant);
}
+ krb5_free_authdata(context, if_relevant);
krb5_free_authdata(context, kdc_issued);
return code;
More information about the cvs-krb5
mailing list