Author: vlendec
Date: 2005-08-03 21:49:04 +0000 (Wed, 03 Aug 2005)
New Revision: 9019

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9019

Log:
Fix an error found by valgrind
Modified:
   trunk/source/smbd/open.c


Changeset:
Modified: trunk/source/smbd/open.c
===================================================================
--- trunk/source/smbd/open.c    2005-08-03 21:28:35 UTC (rev 9018)
+++ trunk/source/smbd/open.c    2005-08-03 21:49:04 UTC (rev 9019)
@@ -841,6 +841,11 @@
                fsp->oplock_type = LEVEL_II_OPLOCK;
        }
 
+       if ((fsp->oplock_type == NO_OPLOCK) && have_level2) {
+               /* Store a level2 oplock, but don't tell the client */
+               fsp->oplock_type = FAKE_LEVEL_II_OPLOCK;
+       }
+
        if (delay_it) {
                DEBUG(10, ("Sending break request to PID %d\n",
                           (int)exclusive->pid));
@@ -853,11 +858,6 @@
                file_free(fsp);
        }
 
-       if ((fsp->oplock_type == NO_OPLOCK) && have_level2) {
-               /* Store a level2 oplock, but don't tell the client */
-               fsp->oplock_type = FAKE_LEVEL_II_OPLOCK;
-       }
-
        SAFE_FREE(share_modes);
        return delay_it;
 }

Reply via email to