]> git.michaelhowe.org Git - packages/o/openafs.git/commit
libadmin: Don't free garbage pointer
authorSimon Wilkinson <sxw@your-file-system.com>
Sat, 2 Mar 2013 11:02:09 +0000 (11:02 +0000)
committerStephan Wiesand <stephan.wiesand@desy.de>
Tue, 3 Jun 2014 16:43:37 +0000 (12:43 -0400)
commita78e3a7e673d5d0428e769a8a9f0ea1ccb683d40
tree5be64858f893956d86bbb34aa548ca6dd8ad631d
parent37eb63dfaf020dfc17553d33a846bf09a9a9566b
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)

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>
(cherry picked from commit 8260d86dda766a21e9f457994e7a3b259ba3a31b)

Change-Id: I79f7fe3cba11a2904c644e6747511e3630d74a79
Reviewed-on: http://gerrit.openafs.org/11047
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/libadmin/pts/afs_ptsAdmin.c