mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 15:00:12 +00:00
libadmin: Don't free garbage pointer
If we jump to the error handler early on in pts_GroupOwnerChange, idlist may not have been used, and so we will end up trying to free stack garbage. Initialise the structure to 0 at the start of the function, so it is always safe to enter the error handler. Caught by coverity (#985962) Change-Id: If70102e3da07135a9ec695f13caebe6298eff8ca Reviewed-on: http://gerrit.openafs.org/9398 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@your-file-system.com> Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
This commit is contained in:
parent
b535059d48
commit
8260d86dda
@ -468,6 +468,8 @@ pts_GroupOwnerChange(const void *cellHandle, const char *targetGroup,
|
||||
afs_cell_handle_p c_handle = (afs_cell_handle_p) cellHandle;
|
||||
idlist ids;
|
||||
|
||||
memset(&ids, 0, sizeof(ids));
|
||||
|
||||
/*
|
||||
* Validate arguments
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user