libadmin: Don't use undefined value
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Fri, 11 Jun 2010 22:50:29 +0000 (23:50 +0100)
committerDerrick Brashear <shadow@dementia.org>
Sun, 13 Jun 2010 05:34:31 +0000 (22:34 -0700)
If IsValidCellHandle returns false, then we can jump to
fail_pts_GroupMemberRemove, and end up using a value for
ids.idlist_val which hasn't been defined. Fix this.

Caught by clang-analyzer.

Change-Id: I030d155f9ad2481250e84c31d4d7d26cb39a9c61
Reviewed-on: http://gerrit.openafs.org/2136
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

src/libadmin/pts/afs_ptsAdmin.c

index 342a9d3..c74e897 100644 (file)
@@ -1479,6 +1479,8 @@ pts_GroupMemberRemove(const void *cellHandle, const char *userName,
     afs_cell_handle_p c_handle = (afs_cell_handle_p) cellHandle;
     idlist ids;
 
+    ids.idlist_val = NULL;
+
     /*
      * Validate arguments
      */