[SCM] Samba Shared Repository - branch master updated
Volker Lendecke
vlendec at samba.org
Tue Jul 31 12:21:02 UTC 2018
The branch, master has been updated
via 8dac16e smb2_query_directory: make 'return true' explicit in smb2_query_directory_next_entry()
via f68b5ee pthreadpool: reset monitor_fd after calling tevent_fd_set_auto_close()
via 6da0d68 pthreadpool: ignore the return value of poll(NULL, 0UL, 1)
from 80c9219 s3/locking: Fix assertion check on lock reference count
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 8dac16e82d04a64d8dee42285fe3fd32cc26f0af
Author: Stefan Metzmacher <metze at samba.org>
Date: Tue Jul 31 09:45:00 2018 +0200
smb2_query_directory: make 'return true' explicit in smb2_query_directory_next_entry()
'return req' should do the same as 'return true' for a bool function,
it's implicitly expanded as 'return (req!=NULL)?true:false.
There's no point in that as 'req' is always a valid pointer.
This was most likely just a copy and paste bug.
So we make this explicit now and avoid that Coverity reports this:
CID 1438158: Null pointer dereferences (REVERSE_INULL)
Null-checking "req" suggests that it may be null, but it has already
been dereferenced on all paths leading to the check.
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
Autobuild-User(master): Volker Lendecke <vl at samba.org>
Autobuild-Date(master): Tue Jul 31 14:20:49 CEST 2018 on sn-devel-144
commit f68b5ee75f002ed542a8423070fb01e3b0e83f65
Author: Stefan Metzmacher <metze at samba.org>
Date: Tue Jul 31 09:42:40 2018 +0200
pthreadpool: reset monitor_fd after calling tevent_fd_set_auto_close()
This tries to convince Coverity that we don't have a resource leak:
CID 1438157: (RESOURCE_LEAK)
Handle variable "monitor_fd" going out of scope leaks the handle.
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
commit 6da0d68f49bbd82f5a08427779c9f5ebd6f755aa
Author: Stefan Metzmacher <metze at samba.org>
Date: Tue Jul 31 09:40:20 2018 +0200
pthreadpool: ignore the return value of poll(NULL, 0UL, 1)
Otherwise Coverity reports this:
CID 1438160: (CHECKED_RETURN)
Calling "poll(NULL, 0UL, 1)" without checking return value. This
library function may fail and return an error code.
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
-----------------------------------------------------------------------
Summary of changes:
lib/pthreadpool/pthreadpool_tevent.c | 5 +++--
source3/smbd/smb2_query_directory.c | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/pthreadpool/pthreadpool_tevent.c b/lib/pthreadpool/pthreadpool_tevent.c
index b4a9786..12148f1 100644
--- a/lib/pthreadpool/pthreadpool_tevent.c
+++ b/lib/pthreadpool/pthreadpool_tevent.c
@@ -719,6 +719,7 @@ static int pthreadpool_tevent_register_ev(
return ENOMEM;
}
tevent_fd_set_auto_close(glue->fde);
+ monitor_fd = -1;
}
/*
@@ -873,7 +874,7 @@ static void pthreadpool_tevent_job_orphan(struct pthreadpool_tevent_job *job)
*/
PTHREAD_TEVENT_JOB_THREAD_FENCE(job);
while (job->needs_fence.wrapper) {
- poll(NULL, 0, 1);
+ (void)poll(NULL, 0, 1);
PTHREAD_TEVENT_JOB_THREAD_FENCE(job);
}
job->wrapper = NULL;
@@ -903,7 +904,7 @@ static void pthreadpool_tevent_job_orphan(struct pthreadpool_tevent_job *job)
if (job->needs_fence.signaled) {
break;
}
- poll(NULL, 0, 1);
+ (void)poll(NULL, 0, 1);
PTHREAD_TEVENT_JOB_THREAD_FENCE(job);
}
diff --git a/source3/smbd/smb2_query_directory.c b/source3/smbd/smb2_query_directory.c
index 9052779..f3b6173 100644
--- a/source3/smbd/smb2_query_directory.c
+++ b/source3/smbd/smb2_query_directory.c
@@ -718,7 +718,7 @@ last_entry_done:
tevent_req_set_callback(subreq,
smb2_query_directory_waited,
req);
- return req;
+ return true;
}
tevent_req_done(req);
--
Samba Shared Repository
More information about the samba-cvs
mailing list