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:
@@ -1438,6 +1438,7 @@ kadm5_ad_init_with_password_ctx(krb5_context context,
|
|||||||
ret = ad_get_cred(ctx, NULL);
|
ret = ad_get_cred(ctx, NULL);
|
||||||
if(ret) {
|
if(ret) {
|
||||||
kadm5_ad_destroy(ctx);
|
kadm5_ad_destroy(ctx);
|
||||||
|
free(ctx);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1445,6 +1446,7 @@ kadm5_ad_init_with_password_ctx(krb5_context context,
|
|||||||
ret = _kadm5_ad_connect(ctx);
|
ret = _kadm5_ad_connect(ctx);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
kadm5_ad_destroy(ctx);
|
kadm5_ad_destroy(ctx);
|
||||||
|
free(ctx);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user