From ad499ad382a7fc21cec0a19236cd602b4bee7366 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Thu, 14 Aug 2008 16:25:29 +0000 Subject: [PATCH] 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 --- src/lib/krb5/krb/copy_creds.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.26.2