]> git.michaelhowe.org Git - packages/o/openafs.git/commit
Unix CM: Don't free cell, then release lock on it
authorSimon Wilkinson <sxw@your-file-system.com>
Wed, 27 Feb 2013 10:28:05 +0000 (10:28 +0000)
committerStephan Wiesand <stephan.wiesand@desy.de>
Tue, 3 Jun 2014 16:26:00 +0000 (12:26 -0400)
commit113ede2a6b43551efe9df19774202e91730dfe11
tree4db2c1cb1994f14cd6a5373d919c5835cefb4b67
parent206d6d9271504cad16326bcb717146ea5b3eed35
Unix CM: Don't free cell, then release lock on it

If afs_NewCell fails, then we can end up releasing a lock on a
section of memory that we have already freed. As this only happens
if the memory we're operating on is newly allocated and not yet
visible to anyone else, it is safe to release the lock before
starting to tidy things up.

Caught by coverity (#986054)

Reviewed-on: http://gerrit.openafs.org/9298
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 816b0c76738b7e404c9384a745b58b4d90bfc30d)

Change-Id: I7976f00431e4dc96642b45fc7563485a5087c938
Reviewed-on: http://gerrit.openafs.org/11025
Reviewed-by: Nathaniel Filardo <nwfilardo@gmail.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/afs/afs_cell.c