Windows: AFSCommonWrite do not leak SectionObjectResource
authorJeffrey Altman <jaltman@your-file-system.com>
Thu, 9 May 2013 22:28:09 +0000 (18:28 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Sat, 11 May 2013 15:06:32 +0000 (08:06 -0700)
commitd1577c80bb8f6752b775a64af68649b648c659d9
treec7b2f38f9005ec5c71da80a2d121a6c43d6b465c
parent641b2fd8d6a270a2fc202450ab8dce044afc48a2
Windows: AFSCommonWrite do not leak SectionObjectResource

If the write request is neither an extending write nor a non-cached
write and (liStartingByte.QuadPart + ulByteCount) >=
pFcb->Header.FileSize.QuadPart, then the SectionObjectResource pointer
will be leaked.  Instead release it before retrying.

Change-Id: Id1ea7a3829a6e2be19280f366e665a11e14fba62
Reviewed-on: http://gerrit.openafs.org/9888
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
src/WINNT/afsrdr/kernel/lib/AFSWrite.cpp