|
|
db6389 |
From 11ebf658c737baddcd5ce91e018213f28c279737 Mon Sep 17 00:00:00 2001
|
|
|
db6389 |
From: Robbie Harwood <rharwood@redhat.com>
|
|
|
db6389 |
Date: Thu, 14 Feb 2019 11:50:35 -0500
|
|
|
db6389 |
Subject: [PATCH] Properly size #ifdef in k5_cccol_lock()
|
|
|
db6389 |
|
|
|
db6389 |
The cleanup code only could get executed in the USE_CCAPI_V3 case, so
|
|
|
db6389 |
move it inside that block. Reported by Coverity.
|
|
|
db6389 |
|
|
|
db6389 |
(cherry picked from commit 444a15f9cf82b9a6c1bca3f20307f82fee91c228)
|
|
|
db6389 |
(cherry picked from commit e2a0e04fb3be9297a8c532dd35a7c1045cae88f4)
|
|
|
db6389 |
---
|
|
|
db6389 |
src/lib/krb5/ccache/ccbase.c | 2 +-
|
|
|
db6389 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
db6389 |
|
|
|
db6389 |
diff --git a/src/lib/krb5/ccache/ccbase.c b/src/lib/krb5/ccache/ccbase.c
|
|
|
db6389 |
index 8198f2b9b..2702bef69 100644
|
|
|
db6389 |
--- a/src/lib/krb5/ccache/ccbase.c
|
|
|
db6389 |
+++ b/src/lib/krb5/ccache/ccbase.c
|
|
|
db6389 |
@@ -511,7 +511,6 @@ krb5_cccol_lock(krb5_context context)
|
|
|
db6389 |
#endif
|
|
|
db6389 |
#ifdef USE_CCAPI_V3
|
|
|
db6389 |
ret = krb5_stdccv3_context_lock(context);
|
|
|
db6389 |
-#endif
|
|
|
db6389 |
if (ret) {
|
|
|
db6389 |
k5_cc_mutex_unlock(context, &krb5int_mcc_mutex);
|
|
|
db6389 |
k5_cc_mutex_unlock(context, &krb5int_cc_file_mutex);
|
|
|
db6389 |
@@ -519,6 +518,7 @@ krb5_cccol_lock(krb5_context context)
|
|
|
db6389 |
k5_cc_mutex_unlock(context, &cccol_lock);
|
|
|
db6389 |
return ret;
|
|
|
db6389 |
}
|
|
|
db6389 |
+#endif
|
|
|
db6389 |
k5_mutex_unlock(&cc_typelist_lock);
|
|
|
db6389 |
return ret;
|
|
|
db6389 |
}
|