From: Jeffrey Altman Date: Sat, 21 Jul 2012 16:02:20 +0000 (-0400) Subject: Windows: memory leak AFSInitPIOCtlDirectoryCB X-Git-Tag: upstream/1.8.0_pre1^2~2193 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=6b0bc2f6ff6ffecb4dd158ba5d2021d46bad7da0;p=packages%2Fo%2Fopenafs.git Windows: memory leak AFSInitPIOCtlDirectoryCB 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 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- diff --git a/src/WINNT/afsrdr/kernel/lib/AFSGeneric.cpp b/src/WINNT/afsrdr/kernel/lib/AFSGeneric.cpp index fb3d23fcc..5dc0510d1 100644 --- a/src/WINNT/afsrdr/kernel/lib/AFSGeneric.cpp +++ b/src/WINNT/afsrdr/kernel/lib/AFSGeneric.cpp @@ -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) {