Fix uninitialized variables
[ira/wip.git] / source3 / nsswitch / libwbclient / wbc_sid.c
index f5f553c4c6a3c8763a999ef4f8083e4f4d20899b..0519d8bf9f2c3c4808e590a25c8b1c2f9cc9e359 100644 (file)
@@ -311,16 +311,16 @@ wbcErr wbcLookupRids(struct wbcDomainSid *dom_sid,
        char *domain_name = NULL;
        wbcErr wbc_status = WBC_ERR_UNKNOWN_FAILURE;
 
-       if (!dom_sid || (num_rids == 0)) {
-               wbc_status = WBC_ERR_INVALID_PARAM;
-               BAIL_ON_WBC_ERROR(wbc_status);
-       }
-
        /* Initialise request */
 
        ZERO_STRUCT(request);
        ZERO_STRUCT(response);
 
+       if (!dom_sid || (num_rids == 0)) {
+               wbc_status = WBC_ERR_INVALID_PARAM;
+               BAIL_ON_WBC_ERROR(wbc_status);
+       }
+
        wbc_status = wbcSidToString(dom_sid, &sid_string);
        BAIL_ON_WBC_ERROR(wbc_status);