In krb5int_copy_creds_contents - if we run out of memory, do not
authorEzra Peisach <epeisach@mit.edu>
Thu, 14 Aug 2008 16:25:29 +0000 (16:25 +0000)
committerEzra Peisach <epeisach@mit.edu>
Thu, 14 Aug 2008 16:25:29 +0000 (16:25 +0000)
release pointer to output creds structure that is passed in by caller.

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

src/lib/krb5/krb/copy_creds.c

index 9fdf9a67d71ada0f9690c03984769fd475b308d1..417a9a449afb3a4efbd6b93ae85c97ed28ba2524 100644 (file)
@@ -108,6 +108,7 @@ krb5int_copy_creds_contents(krb5_context context, const krb5_creds *incred,
  cleanclient:
     krb5_free_principal(context, tempcred->client);
  cleanlast:
-    krb5_xfree(tempcred);
+    /* Do not free tempcred - we did not allocate it - its contents are 
+       garbage - but we should not free it */
     return retval;
 }