s4-wbclient: Cope with winbind returning an error
[samba.git] / source4 / libcli / wbclient / wbclient.c
index 165333a6b587494fa0ecb8ae207af8a3efdf3a7b..b5183be121b409d228b25e9aff535e3d6d4c578e 100644 (file)
@@ -155,6 +155,10 @@ NTSTATUS wbc_sids_to_xids(struct tevent_context *ev, struct id_map *ids,
 
        close(fd);
 
+       if (resp->result != WINBINDD_OK || p == NULL) {
+               return NT_STATUS_INTERNAL_ERROR;
+       }
+
        p = resp->extra_data.data;
 
        for (i=0; i<count; i++) {