From: Jeffrey Altman Date: Sat, 21 Jul 2012 16:00:21 +0000 (-0400) Subject: Windows: memory leak AFSRemoveVolume X-Git-Tag: upstream/1.8.0_pre1^2~2194 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=af1bdc2b7758615ac22505128415a4f10a1f8f10;p=packages%2Fo%2Fopenafs.git Windows: memory leak AFSRemoveVolume Do not leak the VolumeCB->ObjectInformation.Specific.Directory.PIOCtlDirectoryCB->NonPaged allocation and the associated lock object. Change-Id: Ie6455c49fdcee578ab31355df1b2237f27a92e1d Reviewed-on: http://gerrit.openafs.org/7808 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- diff --git a/src/WINNT/afsrdr/kernel/lib/AFSFcbSupport.cpp b/src/WINNT/afsrdr/kernel/lib/AFSFcbSupport.cpp index 53da2cede..1e09d8369 100644 --- a/src/WINNT/afsrdr/kernel/lib/AFSFcbSupport.cpp +++ b/src/WINNT/afsrdr/kernel/lib/AFSFcbSupport.cpp @@ -786,6 +786,10 @@ AFSRemoveVolume( IN AFSVolumeCB *VolumeCB) AFSDeleteObjectInfo( VolumeCB->ObjectInformation.Specific.Directory.PIOCtlDirectoryCB->ObjectInformation); + ExDeleteResourceLite( &VolumeCB->ObjectInformation.Specific.Directory.PIOCtlDirectoryCB->NonPaged->Lock); + + AFSExFreePoolWithTag( VolumeCB->ObjectInformation.Specific.Directory.PIOCtlDirectoryCB->NonPaged, AFS_DIR_ENTRY_NP_TAG); + AFSExFreePoolWithTag( VolumeCB->ObjectInformation.Specific.Directory.PIOCtlDirectoryCB, AFS_DIR_ENTRY_TAG); }