summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2013-07-23 16:04:02 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-07-23 18:18:03 +0200
commitbbb7ba8890908613b1b723746e091aed740af9f9 (patch)
tree6940ff265015fb5ab56d85746fa566bf98b74592
parenta41695473af0a932ffde0878211acef39f96edae (diff)
downloadsssd_unused-bbb7ba8890908613b1b723746e091aed740af9f9.tar.gz
sssd_unused-bbb7ba8890908613b1b723746e091aed740af9f9.tar.xz
sssd_unused-bbb7ba8890908613b1b723746e091aed740af9f9.zip
Fix possible dereference of a NULL pointer.
We check if function ipa_get_ad_id_ctx returns NULL, but function ipa_get_ad_id_ctx could never return NULL. This issue was found by scan-build.
-rw-r--r--src/providers/ipa/ipa_subdomains_id.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/providers/ipa/ipa_subdomains_id.c b/src/providers/ipa/ipa_subdomains_id.c
index 6bf97bec..c380d159 100644
--- a/src/providers/ipa/ipa_subdomains_id.c
+++ b/src/providers/ipa/ipa_subdomains_id.c
@@ -335,7 +335,7 @@ ipa_get_ad_id_ctx(struct ipa_id_ctx *ipa_ctx,
if (iter->dom == dom) break;
}
- return iter->ad_id_ctx;
+ return (iter) ? iter->ad_id_ctx : NULL;
}
static void