lib/kadm5: kadm5_ad_init_with_password_ctx free 'ctx'

kadm5_ad_destroy() frees the contents of the kadm5_ad_context
but not the kadm5_ad_context itself.

Change-Id: I70dc1fc0236166ed9725f681dfeb935f449e38cb
This commit is contained in:
Jeffrey Altman
2022-01-16 20:09:12 -05:00
parent 7c01b2af68
commit 1247ca977c

View File

@@ -1438,6 +1438,7 @@ kadm5_ad_init_with_password_ctx(krb5_context context,
ret = ad_get_cred(ctx, NULL);
if(ret) {
kadm5_ad_destroy(ctx);
free(ctx);
return ret;
}
@@ -1445,6 +1446,7 @@ kadm5_ad_init_with_password_ctx(krb5_context context,
ret = _kadm5_ad_connect(ctx);
if (ret) {
kadm5_ad_destroy(ctx);
free(ctx);
return ret;
}
#endif