From 27dd3fc46ac5f920766c4ceba4ac7899712dec7d Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Thu, 6 Jun 1996 04:46:29 +0000 Subject: [PATCH] When reading in the test value from a file, don't free free inbuf.value until after the last place where we use it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8245 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/gss-sample/ChangeLog | 6 ++++++ src/appl/gss-sample/gss-client.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/appl/gss-sample/ChangeLog b/src/appl/gss-sample/ChangeLog index 6862bc86c..100acd110 100644 --- a/src/appl/gss-sample/ChangeLog +++ b/src/appl/gss-sample/ChangeLog @@ -1,3 +1,9 @@ +Wed Jun 5 00:08:32 1996 Theodore Y. Ts'o + + * gss-client.c (call_server): When reading in the test value from + a file, don't free free inbuf.value until after the last + place where we use it. + Tue Mar 12 23:46:26 1996 Ken Raeburn * gss-server.c (timeval_subtract): Use old-style function diff --git a/src/appl/gss-sample/gss-client.c b/src/appl/gss-sample/gss-client.c index 2f58d1e8f..ff1bfdda1 100644 --- a/src/appl/gss-sample/gss-client.c +++ b/src/appl/gss-sample/gss-client.c @@ -323,8 +323,6 @@ int call_server(host, port, dov2, service_name, msg, use_file) } else if (! state) { fprintf(stderr, "Warning! Message not encrypted.\n"); } - if (use_file) - free(in_buf.value); /* Send to server */ if (send_token(s, &out_buf) < 0) @@ -348,6 +346,8 @@ int call_server(host, port, dov2, service_name, msg, use_file) return -1; } (void) gss_release_buffer(&min_stat, &out_buf); + if (use_file) + free(in_buf.value); printf("Signature verified.\n"); -- 2.26.2