If AFS_UIO_RESID(auio) is zero in afs_write(), we could end up
calling afsio_free(NULL). Guard the free. (In the alternative,
perhaps we should just osi_Assert(totalLength > 0) instead?)
Change-Id: Ic218f039e2034b679cb4817a543af2e8307f36f8
Found-by: clang static analyzer with the help of AFS_NONNULL
Reviewed-on: http://gerrit.openafs.org/5259
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
avc->vc_error = error;
if (!noLock)
ReleaseWriteLock(&avc->lock);
- afsio_free(tuiop);
+ if (tuiop)
+ afsio_free(tuiop);
#ifndef AFS_VM_RDWR_ENV
/*