ccdef, &err_ret, &rep_ret, NULL);
krb5_free_principal(context, server); /* finished using it */
+ krb5_free_principal(context, client);
+ krb5_cc_close(context, ccdef);
+ krb5_auth_con_free(context, auth_context);
if (retval && retval != KRB5_SENDAUTH_REJECTED) {
com_err(argv[0], retval, "while using sendauth");
err_ret->text.length, err_ret->text.data);
} else if (rep_ret) {
/* got a reply */
+ krb5_free_ap_rep_enc_part(context, rep_ret);
+
printf("sendauth succeeded, reply is:\n");
if ((retval = krb5_net_read(context, sock, (char *)&xmitlen,
sizeof(xmitlen))) <= 0) {
recv_data.data[recv_data.length] = '\0';
printf("reply len %d, contents:\n%s\n",
recv_data.length,recv_data.data);
+ free(recv_data.data);
} else {
com_err(argv[0], 0, "no error or reply from sendauth!");
exit(1);
}
+ krb5_free_context(context);
exit(0);
}