summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2016-08-08 09:03:47 +0200
committerLukas Slebodnik <lslebodn@redhat.com>2016-08-08 10:04:56 +0200
commitf9d363f9feb7d057d66ba98337e0f8a6fdbca5ab (patch)
tree3d4f7264ee107238a95e2b7e18f6538ffe74f227 /src/providers/ldap
parent835965da366e468c12015ac35979a8ded0824c66 (diff)
downloadsssd-f9d363f9feb7d057d66ba98337e0f8a6fdbca5ab.tar.gz
sssd-f9d363f9feb7d057d66ba98337e0f8a6fdbca5ab.tar.xz
sssd-f9d363f9feb7d057d66ba98337e0f8a6fdbca5ab.zip
LDAP: Fix Dereference after NULL check
The commit dc30c60f166ad9adc63a47a1013508a71624ac87 changed the logic in NULL check - if (protocol) { + if (protocol == NULL) { Found by Coverity: Reviewed-by: Petr Čech <pcech@redhat.com>
Diffstat (limited to 'src/providers/ldap')
-rw-r--r--src/providers/ldap/ldap_id_services.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/providers/ldap/ldap_id_services.c b/src/providers/ldap/ldap_id_services.c
index e91fc52d7..638cb619b 100644
--- a/src/providers/ldap/ldap_id_services.c
+++ b/src/providers/ldap/ldap_id_services.c
@@ -114,7 +114,7 @@ services_get_send(TALLOC_CTX *mem_ctx,
ret = sss_filter_sanitize(state, name, &clean_name);
if (ret != EOK) goto error;
- if (protocol == NULL) {
+ if (protocol != NULL) {
ret = sss_filter_sanitize(state, protocol, &clean_protocol);
if (ret != EOK) goto error;
}