]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE12-winnt-cleanup-memory-leak-20030303
authorJames Peterson <james@abrakus.com>
Mon, 3 Mar 2003 15:19:53 +0000 (15:19 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 3 Mar 2003 15:19:53 +0000 (15:19 +0000)
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

index 0fa49bc845fcc67c6683c0bb05dfd908ff4161ca..4e026d41ab3eb3a9f9df7f456a5d0cff6584188f 100644 (file)
@@ -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 {