Windows: memory leak AFSRemoveVolume
authorJeffrey Altman <jaltman@your-file-system.com>
Sat, 21 Jul 2012 16:00:21 +0000 (12:00 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Sun, 22 Jul 2012 03:19:39 +0000 (20:19 -0700)
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 <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

src/WINNT/afsrdr/kernel/lib/AFSFcbSupport.cpp

index 53da2ce..1e09d83 100644 (file)
@@ -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);
         }