From: Theodore Tso Date: Thu, 6 Jun 1996 04:46:29 +0000 (+0000) Subject: When reading in the test value from a file, don't free free X-Git-Tag: krb5-1.0-beta6~15 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=27dd3fc46ac5f920766c4ceba4ac7899712dec7d;p=krb5.git 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 --- 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");