For consistency with other functions in AFSCommSupport
modify AFSEvaluateTargetByName to free the DirEntry on
completion if the caller has not provided an out parameter
to accept it.
Change-Id: Ic5b6cc655fd47b95493e6aadb7b23481d0187d5c
Reviewed-on: http://gerrit.openafs.org/5624
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
// Pass back the dir enum entry
//
- *DirEnumEntry = pDirEnumCB;
+ if( DirEnumEntry != NULL)
+ {
+
+ *DirEnumEntry = pDirEnumCB;
+ }
+ else
+ {
+
+ AFSExFreePool( pDirEnumCB);
+ }
try_exit: