From 8dac16e82d04a64d8dee42285fe3fd32cc26f0af Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 31 Jul 2018 09:45:00 +0200 Subject: [PATCH] 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 Reviewed-by: Volker Lendecke Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Tue Jul 31 14:20:49 CEST 2018 on sn-devel-144 --- source3/smbd/smb2_query_directory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/smbd/smb2_query_directory.c b/source3/smbd/smb2_query_directory.c index 90527790817..f3b61737da7 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); -- 2.24.0