From 5733669cb88800f0e24c53b12a09034bbf342442 Mon Sep 17 00:00:00 2001
From: Nalin Dahyabhai <nalin@dahyabhai.net>
Date: Mon, 17 Feb 2014 17:14:20 -0500
Subject: [PATCH 1/4] Don't leak the creds we don't plan to copy over
---
src/lib/krb5/krb/vfy_increds.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/lib/krb5/krb/vfy_increds.c b/src/lib/krb5/krb/vfy_increds.c
index e88a37f..4833992 100644
--- a/src/lib/krb5/krb/vfy_increds.c
+++ b/src/lib/krb5/krb/vfy_increds.c
@@ -69,9 +69,9 @@ copy_creds_except(krb5_context context, krb5_ccache incc,
while (!(ret = krb5_cc_next_cred(context, incc, &cur, &creds))) {
if (krb5_principal_compare(context, princ, creds.server))
- continue;
-
- ret = krb5_cc_store_cred(context, outcc, &creds);
+ ret = 0;
+ else
+ ret = krb5_cc_store_cred(context, outcc, &creds);
krb5_free_cred_contents(context, &creds);
if (ret)
goto cleanup;
--
1.9.0