The delete tokens are unique to each name hash representing a pathname, if we don...
authorJeremy Allison <jra@samba.org>
Fri, 6 Apr 2012 22:39:03 +0000 (15:39 -0700)
committerKarolin Seeger <kseeger@samba.org>
Mon, 7 May 2012 13:09:06 +0000 (15:09 +0200)
source3/locking/locking.c

index 02622d62019265dce3fe9d6f4f8f4f40609f7da6..8587714528a906a6731256ab5f41ac64070629de 100644 (file)
@@ -1560,13 +1560,14 @@ void set_delete_on_close_lck(files_struct *fsp,
                                /* Delete this entry. */
                                DLIST_REMOVE(lck->delete_tokens, dtl);
                                TALLOC_FREE(dtl);
-                               return;
+                       } else {
+                               /* Replace this token with the
+                                  given tok. */
+                               TALLOC_FREE(dtl->delete_token);
+                               dtl->delete_token = copy_unix_token(dtl, tok);
+                               SMB_ASSERT(dtl->delete_token != NULL);
                        }
-                       /* Replace this token with the
-                          given tok. */
-                       TALLOC_FREE(dtl->delete_token);
-                       dtl->delete_token = copy_unix_token(dtl, tok);
-                       SMB_ASSERT(dtl->delete_token != NULL);
+                       return;
                }
        }