From 33649cb41206f568e2bef582e13edbc721184a29 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn@redhat.com>
Date: Mon, 8 Aug 2016 09:03:47 +0200
Subject: [PATCH 73/74] LDAP: Fix Dereference after NULL check
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The commit dc30c60f166ad9adc63a47a1013508a71624ac87
changed the logic in NULL check
- if (protocol) {
+ if (protocol == NULL) {
Found by Coverity:
Reviewed-by: Petr Čech <pcech@redhat.com>
---
src/providers/ldap/ldap_id_services.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/providers/ldap/ldap_id_services.c b/src/providers/ldap/ldap_id_services.c
index e91fc52d731eaa22be7e98365fc75e7057cb8f1f..638cb619b39f135307090dcf0f2c6ab2cc4119d0 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;
}
--
2.4.11