From 6e1cf416866af2143027556b1bc83b3e0d8f3d77 Mon Sep 17 00:00:00 2001 From: James Peterson Date: Mon, 3 Mar 2003 15:19:53 +0000 Subject: [PATCH] STABLE12-winnt-cleanup-memory-leak-20030303 FIXES 1322 due to a change in the smb protocol we leaked memory. fix it. (cherry picked from commit 241c06281036aedbce4c4e8c6a5ce6c981eef27a) --- 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 0fa49bc845..4e026d41ab 100644 --- a/src/WINNT/afsd/smb3.c +++ b/src/WINNT/afsd/smb3.c @@ -2363,8 +2363,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 {