summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorence Blanc-Renaud <flo@redhat.com>2019-03-21 13:59:32 +0100
committerFlorence Blanc-Renaud <flo@redhat.com>2019-03-21 15:18:56 +0100
commit3ae38973c5961c17bd95b6831ab7a8469a4bfc5c (patch)
treea11fcbc12ebde3cc48ca73714351129270b2fa2c
parent333784034ecee29e2d141b2dad65f31b15266144 (diff)
downloadfreeipa-3ae38973c5961c17bd95b6831ab7a8469a4bfc5c.tar.gz
freeipa-3ae38973c5961c17bd95b6831ab7a8469a4bfc5c.tar.xz
freeipa-3ae38973c5961c17bd95b6831ab7a8469a4bfc5c.zip
Coverity: fix issue in ipa_extdom_extop.c
Coverity found the following issue: Error: BAD_COMPARE (CWE-697): [#def1] freeipa-4.6.5/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c:121: null_misuse: Comparing pointer "threadnumber" against "NULL" using anything besides "==" or "!=" is likely to be incorrect. The comparison is using the pointer while it should use the pointed value. Fixes: https://pagure.io/freeipa/issue/7884 Reviewed-By: Christian Heimes <cheimes@redhat.com>
-rw-r--r--daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c b/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c
index 3abaa411d..10d3f86eb 100644
--- a/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c
+++ b/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c
@@ -118,7 +118,7 @@ static int ipa_get_threadnumber(Slapi_ComponentId *plugin_id, size_t *threadnumb
*threadnumber = slapi_entry_attr_get_uint(search_entries[0],
NSSLAPD_THREADNUMBER);
- if (threadnumber <= 0) {
+ if (*threadnumber <= 0) {
LOG_FATAL("No thread number found.\n");
ret = LDAP_OPERATIONS_ERROR;
goto done;