summaryrefslogtreecommitdiffstats
path: root/src/tests/krb5_child-test.c
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/tests/krb5_child-test.c
parent92c6d2bbff680c3f4a83fbb1360eed098e7bcf2e (diff)
downloadsssd-1fff416ecccc5a42c3dd82f128fd2f18a45482e8.tar.gz
sssd-1fff416ecccc5a42c3dd82f128fd2f18a45482e8.tar.xz
sssd-1fff416ecccc5a42c3dd82f128fd2f18a45482e8.zip
Avoid NULL-dereference in error-handling
Coverity #12783
Diffstat (limited to 'src/tests/krb5_child-test.c')
-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 82252a610..4d39e1c00 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);