s3:winbindd: fix error handling in wb_next_grent_fetch_done()
authorStefan Metzmacher <metze@samba.org>
Tue, 17 Aug 2010 06:05:14 +0000 (08:05 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 20 Aug 2010 12:23:41 +0000 (14:23 +0200)
We should not use 'result' uninitialized.

metze

source3/winbindd/wb_next_grent.c

index 523f8cda8a889d9556d8604366f1b015b6d58204..1c906bd9dde75b554c2d770ad2c1eb119a7b139c 100644 (file)
@@ -100,7 +100,15 @@ static void wb_next_grent_fetch_done(struct tevent_req *subreq)
 
        status = dcerpc_wbint_QueryGroupList_recv(subreq, state, &result);
        TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status) || !NT_STATUS_IS_OK(result)) {
+       if (!NT_STATUS_IS_OK(status)) {
+               /* Ignore errors here, just log it */
+               DEBUG(10, ("query_user_list for domain %s returned %s\n",
+                          state->gstate->domain->name,
+                          nt_errstr(status)));
+               tevent_req_nterror(req, status);
+               return;
+       }
+       if (!NT_STATUS_IS_OK(result)) {
                /* Ignore errors here, just log it */
                DEBUG(10, ("query_user_list for domain %s returned %s/%s\n",
                           state->gstate->domain->name,