viced: avoid crash if missing volume header

Avoid a fileserver crash if the volume header is
missing in SetVolumeSync.

Change-Id: I509081306402fc7147d0624aa1181330b9fa9fc5
Reviewed-on: http://gerrit.openafs.org/7301
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
Michael Meffie 2012-05-01 10:09:44 -04:00 committed by Derrick Brashear
parent 94a8ce970d
commit ae5ad93799

View File

@ -244,7 +244,7 @@ SetVolumeSync(struct AFSVolSync *async, Volume * avol)
FS_LOCK;
/* date volume instance was created */
if (async) {
if (avol)
if (avol && avol->header)
async->spare1 = avol->header->diskstuff.creationDate;
else
async->spare1 = 0;