From 241c06281036aedbce4c4e8c6a5ce6c981eef27a Mon Sep 17 00:00:00 2001 From: James Peterson Date: Mon, 3 Mar 2003 15:19:00 +0000 Subject: [PATCH] winnt-cleanup-memory-leak-20030303 FIXES 1322 due to a change in the smb protocol we leaked memory. fix it. --- src/WINNT/afsd/smb3.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/WINNT/afsd/smb3.c b/src/WINNT/afsd/smb3.c index 96b2201a2e..4273525763 100644 --- a/src/WINNT/afsd/smb3.c +++ b/src/WINNT/afsd/smb3.c @@ -2365,8 +2365,9 @@ nextEntry: * or if something went wrong, close the search. */ /* ((searchFlags & 1) || ((searchFlags & 2) && eos) */ - if ((searchFlags & 1) || (returnedNames == 0) - || code != 0) smb_DeleteDirSearch(dsp); + if ((searchFlags & 1) || (returnedNames == 0) || ((searchFlags & 2) && + eos) || code != 0) + smb_DeleteDirSearch(dsp); if (code) smb_SendTran2Error(vcp, p, opx, code); else {