summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEzra Peisach <epeisach@mit.edu>2008-08-14 16:25:29 +0000
committerEzra Peisach <epeisach@mit.edu>2008-08-14 16:25:29 +0000
commitad499ad382a7fc21cec0a19236cd602b4bee7366 (patch)
treec65ae9823a4b037d9d94c156c47affbd0bfddf27
parentedddcccb6dbad4254d174d2ab456bf3c62ee42af (diff)
downloadkrb5-ad499ad382a7fc21cec0a19236cd602b4bee7366.tar.gz
krb5-ad499ad382a7fc21cec0a19236cd602b4bee7366.tar.xz
krb5-ad499ad382a7fc21cec0a19236cd602b4bee7366.zip
In krb5int_copy_creds_contents - if we run out of memory, do not
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
-rw-r--r--src/lib/krb5/krb/copy_creds.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/krb5/krb/copy_creds.c b/src/lib/krb5/krb/copy_creds.c
index 9fdf9a67d..417a9a449 100644
--- a/src/lib/krb5/krb/copy_creds.c
+++ b/src/lib/krb5/krb/copy_creds.c
@@ -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;
}