Do not free memory before done using it. (The credential was pointing
authorEzra Peisach <epeisach@mit.edu>
Thu, 22 Feb 1996 13:11:38 +0000 (13:11 +0000)
committerEzra Peisach <epeisach@mit.edu>
Thu, 22 Feb 1996 13:11:38 +0000 (13:11 +0000)
to memory that is freed and then referenced again)

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7501 dc483132-0cff-0310-8789-dd5450dbe970

src/clients/kinit/ChangeLog
src/clients/kinit/kinit.c

index 87bf40b8f557807adcfdce7da291bb71cbe72a8a..b7c2ed7282dce1a876f4b1d56063449acdef6280 100644 (file)
@@ -1,3 +1,7 @@
+Thu Feb 15 12:31:03 1996  Ezra Peisach  <epeisach@kangaroo.mit.edu>
+
+       * kinit.c (main): Do not free memory until all done using it.
+
 Tue Sep 26 22:19:32 1995  Mark Eichin  <eichin@cygnus.com>
 
        * kinit.c (KRB5_DEFAULT_LIFE): default life should be 10 hours,
index 1e3a802b69629dc4ab5ca21623f5aff8f2858e95..38e3d751c9d72d6efa77e9c2b54cbb3e4ad73d0e 100644 (file)
@@ -273,8 +273,6 @@ main(argc, argv)
 #endif
     }
     
-    krb5_free_principal(kcontext, server);
-    
     if (code) {
        if (code == KRB5KRB_AP_ERR_BAD_INTEGRITY)
            fprintf (stderr, "%s: Password incorrect\n", argv[0]);
@@ -296,5 +294,10 @@ main(argc, argv)
        exit(1);
     }
 
+    /* my_creds is pointing at server */
+    krb5_free_principal(kcontext, server);
+
+    krb5_free_context(kcontext);
+    
     exit(0);
 }