pull up r20527 from trunk
authorTom Yu <tlyu@mit.edu>
Mon, 21 Jul 2008 16:08:33 +0000 (16:08 +0000)
committerTom Yu <tlyu@mit.edu>
Mon, 21 Jul 2008 16:08:33 +0000 (16:08 +0000)
 r20527@cathode-dark-space:  tlyu | 2008-07-15 17:43:35 -0400
 ticket: new
 subject: krb5_get_cred_via_tkt() should null out_cred on errors
 tags: pullup
 target_version: 1.6.4
 component: krb5-libs

 Helper function krb5_kdcrep2creds(), called from
 krb5_get_cred_via_tkt(), should null its output pointer after freeing
 allocated memory, to avoid returning an invalid pointer.

ticket: 6033
status: resolved
version_fixed: 1.6.4

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-6@20550 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/gc_via_tkt.c

index aab347fc5e1be37d4c4085f268c34baa01b906bc..d622f9588f157b9c7ab0cbc2fce21389a184b18e 100644 (file)
@@ -100,6 +100,7 @@ cleanup_keyblock:
 
 cleanup:
     free (*ppcreds);
+    *ppcreds = NULL;
     return retval;
 }