Windows: memory leak AFSInitPIOCtlDirectoryCB
authorJeffrey Altman <jaltman@your-file-system.com>
Sat, 21 Jul 2012 16:02:20 +0000 (12:02 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Sun, 22 Jul 2012 03:20:03 +0000 (20:20 -0700)
In an error occurs during AFSInitPIOCtlDirectoryCB processing
the nonpaged pool allocation would be leaked.

Change-Id: I092538202d84bd65476ba21a68e210d5f626ead2
Reviewed-on: http://gerrit.openafs.org/7809
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/AFSGeneric.cpp

index fb3d23f..5dc0510 100644 (file)
@@ -5942,6 +5942,14 @@ try_exit:
                 AFSExFreePoolWithTag( pDirNode, AFS_DIR_ENTRY_TAG);
             }
 
+            if( pNonPagedDirEntry != NULL)
+            {
+
+                ExDeleteResourceLite( &pNonPagedDirEntry->Lock);
+
+                AFSExFreePoolWithTag( pNonPagedDirEntry, AFS_DIR_ENTRY_NP_TAG);
+            }
+
             if ( pObjectInfoCB != NULL)
             {