summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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;
}