From bbb7ba8890908613b1b723746e091aed740af9f9 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Tue, 23 Jul 2013 16:04:02 +0200 Subject: 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. --- src/providers/ipa/ipa_subdomains_id.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/providers/ipa') 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 -- cgit