Free context after use, not before
authorKen Raeburn <raeburn@mit.edu>
Thu, 15 May 2008 23:01:23 +0000 (23:01 +0000)
committerKen Raeburn <raeburn@mit.edu>
Thu, 15 May 2008 23:01:23 +0000 (23:01 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20317 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/gssapi/krb5/import_sec_context.c

index 7563dc0d7d74ed7de9ab6eeb01475f43c7ac286c..2e73b9f521247324474210c7416caaa9d146d819 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * lib/gssapi/krb5/import_sec_context.c
  *
- * Copyright 1995,2004,2007 by the Massachusetts Institute of Technology.
+ * Copyright 1995,2004,2007,2008 by the Massachusetts Institute of Technology.
  * All Rights Reserved.
  *
  * Export of this software from the United States of America may
@@ -91,9 +91,9 @@ krb5_gss_import_sec_context(minor_status, interprocess_token, context_handle)
     }
     kret = krb5_gss_ser_init(context);
     if (kret) {
-       krb5_free_context(context);
        *minor_status = kret;
        save_error_info(*minor_status, context);
+       krb5_free_context(context);
        return GSS_S_FAILURE;
     }