summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2012-07-09 12:07:17 -0400
committerStephen Gallagher <sgallagh@redhat.com>2012-07-09 13:49:21 -0400
commit1fff416ecccc5a42c3dd82f128fd2f18a45482e8 (patch)
treec0d1ff36de70591b3fc80e07c4f0f0e0038b23de /src
parent92c6d2bbff680c3f4a83fbb1360eed098e7bcf2e (diff)
downloadsssd-1fff416ecccc5a42c3dd82f128fd2f18a45482e8.tar.gz
sssd-1fff416ecccc5a42c3dd82f128fd2f18a45482e8.tar.bz2
sssd-1fff416ecccc5a42c3dd82f128fd2f18a45482e8.zip
Avoid NULL-dereference in error-handling
Coverity #12783
Diffstat (limited to 'src')
-rw-r--r--src/tests/krb5_child-test.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tests/krb5_child-test.c b/src/tests/krb5_child-test.c
index 82252a61..4d39e1c0 100644
--- a/src/tests/krb5_child-test.c
+++ b/src/tests/krb5_child-test.c
@@ -551,7 +551,9 @@ main(int argc, const char *argv[])
ret = 0;
done:
- if (rm_ccache && ctx->res && ctx->res->ccname) {
+ if (rm_ccache && ctx->res
+ && ctx->res->ccname
+ && ctx->kr) {
ctx->kr->krb5_ctx->cc_be->remove(ctx->res->ccname);
}
free(password);