{
kadm5_server_handle_t handle;
+ *out_handle = NULL;
+
if (! (handle = (kadm5_server_handle_t)
malloc(sizeof(*handle))))
return ENOMEM;
*/
static void free_server_handle(kadm5_server_handle_t handle)
{
+ if (!handle)
+ return;
krb5_free_principal(handle->context, handle->current_caller);
free(handle);
}
if ((ret.code = new_server_handle(arg->api_version, rqstp, &handle)))
goto exit_func;
- if ((ret.code = check_handle((void *)handle))) {
- free_server_handle(handle);
+ if ((ret.code = check_handle((void *)handle)))
goto exit_func;
- }
ret.api_version = handle->api_version;
if (errmsg != NULL)
krb5_free_error_message(handle->context, errmsg);
}
- free_server_handle(handle);
free(prime_arg);
gss_release_buffer(&minor_stat, &client_name);
gss_release_buffer(&minor_stat, &service_name);
exit_func:
+ free_server_handle(handle);
return &ret;
}
if ((ret.code = new_server_handle(arg->api_version, rqstp, &handle)))
goto exit_func;
- if ((ret.code = check_handle((void *)handle))) {
- free_server_handle(handle);
+ if ((ret.code = check_handle((void *)handle)))
goto exit_func;
- }
ret.api_version = handle->api_version;
if (errmsg != NULL)
krb5_free_error_message(handle->context, errmsg);
}
- free_server_handle(handle);
free(prime_arg);
gss_release_buffer(&minor_stat, &client_name);
gss_release_buffer(&minor_stat, &service_name);
+
exit_func:
+ free_server_handle(handle);
return &ret;
}
if ((ret.code = new_server_handle(arg->api_version, rqstp, &handle)))
goto exit_func;
- if ((ret.code = check_handle((void *)handle))) {
- free_server_handle(handle);
+ if ((ret.code = check_handle((void *)handle)))
goto exit_func;
- }
ret.api_version = handle->api_version;
}
free(prime_arg);
- free_server_handle(handle);
gss_release_buffer(&minor_stat, &client_name);
gss_release_buffer(&minor_stat, &service_name);
- exit_func:
+exit_func:
+ free_server_handle(handle);
return &ret;
}
if ((ret.code = new_server_handle(arg->api_version, rqstp, &handle)))
goto exit_func;
- if ((ret.code = check_handle((void *)handle))) {
- free_server_handle(handle);
+ if ((ret.code = check_handle((void *)handle)))
goto exit_func;
- }
if (setup_gss_names(rqstp, &client_name, &service_name) < 0) {
ret.code = KADM5_FAILURE;
if (errmsg != NULL)
krb5_free_error_message(handle->context, errmsg);
}
- free_server_handle(handle);
free(prime_arg);
gss_release_buffer(&minor_stat, &client_name);
gss_release_buffer(&minor_stat, &service_name);
exit_func:
+ free_server_handle(handle);
return &ret;
}
if ((ret.code = new_server_handle(arg->api_version, rqstp, &handle)))
goto exit_func;
- if ((ret.code = check_handle((void *)handle))) {
- free_server_handle(handle);
+ if ((ret.code = check_handle((void *)handle)))
goto exit_func;
- }
if (setup_gss_names(rqstp, &client_name, &service_name) < 0) {
ret.code = KADM5_FAILURE;
krb5_free_error_message(handle->context, errmsg);
}
- free_server_handle(handle);
free(prime_arg1);
free(prime_arg2);
gss_release_buffer(&minor_stat, &client_name);
gss_release_buffer(&minor_stat, &service_name);
exit_func:
+ free_server_handle(handle);
return &ret;
}
if ((ret.code = new_server_handle(arg->api_version, rqstp, &handle)))
goto exit_func;
- if ((ret.code = check_handle((void *)handle))) {
- free_server_handle(handle);
+ if ((ret.code = check_handle((void *)handle)))
goto exit_func;
- }
ret.api_version = handle->api_version;
if (errmsg != NULL)
krb5_free_error_message(handle->context, errmsg);
}
- free_server_handle(handle);
free(prime_arg);
gss_release_buffer(&minor_stat, &client_name);
gss_release_buffer(&minor_stat, &service_name);
exit_func:
+ free_server_handle(handle);
return &ret;
}
if ((ret.code = new_server_handle(arg->api_version, rqstp, &handle)))
goto exit_func;
- if ((ret.code = check_handle((void *)handle))) {
- free_server_handle(handle);
+ if ((ret.code = check_handle((void *)handle)))
goto exit_func;
- }
ret.api_version = handle->api_version;
krb5_free_error_message(handle->context, errmsg);
}
- free_server_handle(handle);
gss_release_buffer(&minor_stat, &client_name);
gss_release_buffer(&minor_stat, &service_name);
exit_func:
+ free_server_handle(handle);
return &ret;
}
if ((ret.code = new_server_handle(arg->api_version, rqstp, &handle)))
goto exit_func;
- if ((ret.code = check_handle((void *)handle))) {
- free_server_handle(handle);
+ if ((ret.code = check_handle((void *)handle)))
goto exit_func;
- }
ret.api_version = handle->api_version;
krb5_free_error_message(handle->context, errmsg);
}
- free_server_handle(handle);
free(prime_arg);
gss_release_buffer(&minor_stat, &client_name);
gss_release_buffer(&minor_stat, &service_name);
exit_func:
+ free_server_handle(handle);
return &ret;
}
if ((ret.code = new_server_handle(arg->api_version, rqstp, &handle)))
goto exit_func;
- if ((ret.code = check_handle((void *)handle))) {
- free_server_handle(handle);
+ if ((ret.code = check_handle((void *)handle)))
goto exit_func;
- }
ret.api_version = handle->api_version;
krb5_free_error_message(handle->context, errmsg);
}
- free_server_handle(handle);
free(prime_arg);
gss_release_buffer(&minor_stat, &client_name);
gss_release_buffer(&minor_stat, &service_name);
exit_func:
+ free_server_handle(handle);
return &ret;
}
if ((ret.code = new_server_handle(arg->api_version, rqstp, &handle)))
goto exit_func;
- if ((ret.code = check_handle((void *)handle))) {
- free_server_handle(handle);
+ if ((ret.code = check_handle((void *)handle)))
goto exit_func;
- }
ret.api_version = handle->api_version;
krb5_free_error_message(handle->context, errmsg);
}
- free_server_handle(handle);
free(prime_arg);
gss_release_buffer(&minor_stat, &client_name);
gss_release_buffer(&minor_stat, &service_name);
exit_func:
+ free_server_handle(handle);
return &ret;
}
if ((ret.code = new_server_handle(arg->api_version, rqstp, &handle)))
goto exit_func;
- if ((ret.code = check_handle((void *)handle))) {
- free_server_handle(handle);
+ if ((ret.code = check_handle((void *)handle)))
goto exit_func;
- }
ret.api_version = handle->api_version;
krb5_free_error_message(handle->context, errmsg);
}
- free_server_handle(handle);
free(prime_arg);
gss_release_buffer(&minor_stat, &client_name);
gss_release_buffer(&minor_stat, &service_name);
exit_func:
+ free_server_handle(handle);
return &ret;
}
if ((ret.code = new_server_handle(arg->api_version, rqstp, &handle)))
goto exit_func;
- if ((ret.code = check_handle((void *)handle))) {
- free_server_handle(handle);
+ if ((ret.code = check_handle((void *)handle)))
goto exit_func;
- }
ret.api_version = handle->api_version;
krb5_free_error_message(handle->context, errmsg);
}
- free_server_handle(handle);
free(prime_arg);
gss_release_buffer(&minor_stat, &client_name);
gss_release_buffer(&minor_stat, &service_name);
exit_func:
+ free_server_handle(handle);
return &ret;
}
goto exit_func;
- if ((ret.code = check_handle((void *)handle))) {
- free_server_handle(handle);
+ if ((ret.code = check_handle((void *)handle)))
goto exit_func;
- }
ret.api_version = handle->api_version;
if (setup_gss_names(rqstp, &client_name, &service_name) < 0) {
ret.code = KADM5_FAILURE;
- free_server_handle(handle);
goto exit_func;
}
if (krb5_unparse_name(handle->context, arg->princ, &prime_arg)) {
if (errmsg != NULL)
krb5_free_error_message(handle->context, errmsg);
}
- free_server_handle(handle);
free(prime_arg);
gss_release_buffer(&minor_stat, &client_name);
gss_release_buffer(&minor_stat, &service_name);
exit_func:
+ free_server_handle(handle);
return &ret;
}
if ((ret.code = new_server_handle(arg->api_version, rqstp, &handle)))
goto exit_func;
- if ((ret.code = check_handle((void *)handle))) {
- free_server_handle(handle);
+ if ((ret.code = check_handle((void *)handle)))
goto exit_func;
- }
ret.api_version = handle->api_version;
if (setup_gss_names(rqstp, &client_name, &service_name) < 0) {
ret.code = KADM5_FAILURE;
- free_server_handle(handle);
goto exit_func;
}
if (krb5_unparse_name(handle->context, arg->princ, &prime_arg)) {
if (errmsg != NULL)
krb5_free_error_message(handle->context, errmsg);
}
- free_server_handle(handle);
free(prime_arg);
gss_release_buffer(&minor_stat, &client_name);
gss_release_buffer(&minor_stat, &service_name);
exit_func:
+ free_server_handle(handle);
return &ret;
}
if ((ret.code = new_server_handle(arg->api_version, rqstp, &handle)))
goto exit_func;
- if ((ret.code = check_handle((void *)handle))) {
- free_server_handle(handle);
+ if ((ret.code = check_handle((void *)handle)))
goto exit_func;
- }
ret.api_version = handle->api_version;
if (errmsg != NULL)
krb5_free_error_message(handle->context, errmsg);
}
- free_server_handle(handle);
gss_release_buffer(&minor_stat, &client_name);
gss_release_buffer(&minor_stat, &service_name);
exit_func:
+ free_server_handle(handle);
return &ret;
}
if ((ret.code = new_server_handle(arg->api_version, rqstp, &handle)))
goto exit_func;
- if ((ret.code = check_handle((void *)handle))) {
- free_server_handle(handle);
+ if ((ret.code = check_handle((void *)handle)))
goto exit_func;
- }
ret.api_version = handle->api_version;
if (errmsg != NULL)
krb5_free_error_message(handle->context, errmsg);
}
- free_server_handle(handle);
gss_release_buffer(&minor_stat, &client_name);
gss_release_buffer(&minor_stat, &service_name);
exit_func:
+ free_server_handle(handle);
return &ret;
}
if ((ret.code = new_server_handle(arg->api_version, rqstp, &handle)))
goto exit_func;
- if ((ret.code = check_handle((void *)handle))) {
- free_server_handle(handle);
+ if ((ret.code = check_handle((void *)handle)))
goto exit_func;
- }
ret.api_version = handle->api_version;
if (errmsg != NULL)
krb5_free_error_message(handle->context, errmsg);
}
- free_server_handle(handle);
gss_release_buffer(&minor_stat, &client_name);
gss_release_buffer(&minor_stat, &service_name);
exit_func:
+ free_server_handle(handle);
return &ret;
}
if ((ret.code = new_server_handle(arg->api_version, rqstp, &handle)))
goto exit_func;
- if ((ret.code = check_handle((void *)handle))) {
- free_server_handle(handle);
+ if ((ret.code = check_handle((void *)handle)))
goto exit_func;
- }
ret.api_version = handle->api_version;
log_unauth(funcname, prime_arg,
&client_name, &service_name, rqstp);
}
- free_server_handle(handle);
gss_release_buffer(&minor_stat, &client_name);
gss_release_buffer(&minor_stat, &service_name);
exit_func:
+ free_server_handle(handle);
return &ret;
}
if ((ret.code = new_server_handle(arg->api_version, rqstp, &handle)))
goto exit_func;
- if ((ret.code = check_handle((void *)handle))) {
- free_server_handle(handle);
+ if ((ret.code = check_handle((void *)handle)))
goto exit_func;
- }
ret.api_version = handle->api_version;
if (errmsg != NULL)
krb5_free_error_message(handle->context, errmsg);
}
- free_server_handle(handle);
gss_release_buffer(&minor_stat, &client_name);
gss_release_buffer(&minor_stat, &service_name);
exit_func:
+ free_server_handle(handle);
return &ret;
}
if ((ret.code = new_server_handle(*arg, rqstp, &handle)))
goto exit_func;
- if ((ret.code = check_handle((void *)handle))) {
- free_server_handle(handle);
+ if ((ret.code = check_handle((void *)handle)))
goto exit_func;
- }
ret.api_version = handle->api_version;
if (errmsg != NULL)
krb5_free_error_message(handle->context, errmsg);
- free_server_handle(handle);
gss_release_buffer(&minor_stat, &client_name);
gss_release_buffer(&minor_stat, &service_name);
exit_func:
+ free_server_handle(handle);
return &ret;
}