summaryrefslogtreecommitdiff
path: root/source3/nsswitch/libwbclient/wbc_pwd.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-01-29 23:01:23 +0100
committerGerald W. Carter <jerry@samba.org>2008-01-29 16:24:59 -0600
commit1852c29b6e202c9988755cf649786c1635574aa5 (patch)
tree4c67e0fad3dfde989258a99b48d6a60133d47a04 /source3/nsswitch/libwbclient/wbc_pwd.c
parentc0aa988e83c16ac7fe9d1a9d6cb51fa989aab1e9 (diff)
downloadsamba-1852c29b6e202c9988755cf649786c1635574aa5.tar.gz
samba-1852c29b6e202c9988755cf649786c1635574aa5.tar.bz2
samba-1852c29b6e202c9988755cf649786c1635574aa5.zip
Fix uninitialized variables
response.extra_data.data is not initialized on the first error path Found by the IBM checker (This used to be commit e9b3115c85e3d04eeaa04bfa71972d393272afca)
Diffstat (limited to 'source3/nsswitch/libwbclient/wbc_pwd.c')
-rw-r--r--source3/nsswitch/libwbclient/wbc_pwd.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source3/nsswitch/libwbclient/wbc_pwd.c b/source3/nsswitch/libwbclient/wbc_pwd.c
index b24e198bc5..b7febcce0c 100644
--- a/source3/nsswitch/libwbclient/wbc_pwd.c
+++ b/source3/nsswitch/libwbclient/wbc_pwd.c
@@ -209,16 +209,16 @@ wbcErr wbcGetgrnam(const char *name, struct group **grp)
struct winbindd_request request;
struct winbindd_response response;
- if (!name || !grp) {
- wbc_status = WBC_ERR_INVALID_PARAM;
- BAIL_ON_WBC_ERROR(wbc_status);
- }
-
/* Initialize request */
ZERO_STRUCT(request);
ZERO_STRUCT(response);
+ if (!name || !grp) {
+ wbc_status = WBC_ERR_INVALID_PARAM;
+ BAIL_ON_WBC_ERROR(wbc_status);
+ }
+
/* dst is already null terminated from the memset above */
strncpy(request.data.groupname, name, sizeof(request.data.groupname)-1);
@@ -254,16 +254,16 @@ wbcErr wbcGetgrgid(gid_t gid, struct group **grp)
struct winbindd_request request;
struct winbindd_response response;
- if (!grp) {
- wbc_status = WBC_ERR_INVALID_PARAM;
- BAIL_ON_WBC_ERROR(wbc_status);
- }
-
/* Initialize request */
ZERO_STRUCT(request);
ZERO_STRUCT(response);
+ if (!grp) {
+ wbc_status = WBC_ERR_INVALID_PARAM;
+ BAIL_ON_WBC_ERROR(wbc_status);
+ }
+
request.data.gid = gid;
wbc_status = wbcRequestResponse(WINBINDD_GETGRGID,