viced: avoid crash if missing volume header
authorMichael Meffie <mmeffie@sinenomine.net>
Tue, 1 May 2012 14:09:44 +0000 (10:09 -0400)
committerDerrick Brashear <shadow@dementix.org>
Tue, 1 May 2012 15:04:01 +0000 (08:04 -0700)
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>

src/viced/afsfileprocs.c

index 69aff57..7702c6a 100644 (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;