]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Fix an uninitialized variable found by the IBM checker
authorVolker Lendecke <vl@samba.org>
Sat, 14 Jun 2008 22:22:47 +0000 (00:22 +0200)
committerVolker Lendecke <vl@samba.org>
Sat, 14 Jun 2008 22:24:18 +0000 (00:24 +0200)
BAIL_ON_PTR_ERROR jumps to done: which will access extra_data before it's
initialized.

Stefan, please check!

Volker
(cherry picked from commit b59636f78d351ed6d52c4a9fdccdb7850388526c)
(This used to be commit 5663587e5e4703f9e3ff6d78d1f3248053ccd4c0)

source3/nsswitch/libwbclient/wbc_pwd.c

index d23c378b5fdd89a3c6bb78548246f8ed87a7c237..b5f167369cabfb8e11c97e0c12aff9b362f991a6 100644 (file)
@@ -394,16 +394,16 @@ wbcErr wbcGetGroups(const char *account,
        uint32_t i;
        gid_t *groups = NULL;
 
-       if (!account) {
-               wbc_status = WBC_ERR_INVALID_PARAM;
-               BAIL_ON_WBC_ERROR(wbc_status);
-       }
-
        /* Initialize request */
 
        ZERO_STRUCT(request);
        ZERO_STRUCT(response);
 
+       if (!account) {
+               wbc_status = WBC_ERR_INVALID_PARAM;
+               BAIL_ON_WBC_ERROR(wbc_status);
+       }
+
        /* Send request */
 
        strncpy(request.data.username, account, sizeof(request.data.username)-1);