]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:winbind: Move up some code in winbindd_getusersids.c
authorPavel Filipenský <pfilipen@redhat.com>
Thu, 5 Aug 2021 13:17:57 +0000 (15:17 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 15 Jul 2022 14:25:38 +0000 (14:25 +0000)
Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/winbindd/winbindd_getusersids.c

index 1f2546a7ba196c70d438ff52401fce5d9fd48ed1..c2347473f5f3cf793d5065e0e55f0e37acf2f2f0 100644 (file)
@@ -101,6 +101,9 @@ NTSTATUS winbindd_getusersids_recv(struct tevent_req *req,
        }
 
        result = talloc_strdup(response, "");
+       if (result == NULL) {
+               return NT_STATUS_NO_MEMORY;
+       }
 
        for (i=0; i<state->num_sids; i++) {
                talloc_asprintf_addbuf(
@@ -109,9 +112,6 @@ NTSTATUS winbindd_getusersids_recv(struct tevent_req *req,
                        dom_sid_str_buf(&state->sids[i], &sidbuf));
        }
 
-       if (result == NULL) {
-               return NT_STATUS_NO_MEMORY;
-       }
 
        response->data.num_entries = state->num_sids;
        response->extra_data.data = result;