diff options
| author | Theodore Tso <tytso@mit.edu> | 1995-09-16 07:46:49 +0000 |
|---|---|---|
| committer | Theodore Tso <tytso@mit.edu> | 1995-09-16 07:46:49 +0000 |
| commit | 74c30e067f9e48d734b73228044e9fc4a0d4f2df (patch) | |
| tree | 3f01ab36b3d7bffddda20cf40fe2a9f5fa9bbf56 /src/appl/simple/client/sim_client.c | |
| parent | 0713352c63ec19807060ad4581efe7856a7adced (diff) | |
| download | krb5-74c30e067f9e48d734b73228044e9fc4a0d4f2df.tar.gz krb5-74c30e067f9e48d734b73228044e9fc4a0d4f2df.tar.xz krb5-74c30e067f9e48d734b73228044e9fc4a0d4f2df.zip | |
Fix optional host parsing so that host is recognized as an argument
without the -h option. Free the context and auth_context structures
before exiting.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6803 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/appl/simple/client/sim_client.c')
| -rw-r--r-- | src/appl/simple/client/sim_client.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/appl/simple/client/sim_client.c b/src/appl/simple/client/sim_client.c index 15644ee7eb..6a5af01168 100644 --- a/src/appl/simple/client/sim_client.c +++ b/src/appl/simple/client/sim_client.c @@ -127,10 +127,10 @@ main(argc, argv) } argc -= optind; argv += optind; - if (argc > 1) { + if (argc > 0) { if (hostname) usage(); - hostname = argv[1]; + hostname = argv[0]; } if (hostname == 0) { @@ -332,5 +332,9 @@ main(argc, argv) com_err(progname, errno, "while sending PRIV message"); printf("Sent encrypted message: %d bytes\n", i); krb5_xfree(packet.data); + + krb5_auth_con_free(context, auth_context); + krb5_free_context(context); + exit(0); } |
