diff options
author | Volker Lendecke <vl@samba.org> | 2014-10-28 15:31:46 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-12-04 05:45:10 +0100 |
commit | 02f2684dd8e88f1c55bf69fa8b2aa27c1c404a3d (patch) | |
tree | da939628a1a2f01b63b3d6cb4f612c53c274e44c /source3/smbd/files.c | |
parent | 91b2488c9ad25b35d717bca505acc9dd060be677 (diff) | |
download | samba-02f2684dd8e88f1c55bf69fa8b2aa27c1c404a3d.tar.gz samba-02f2684dd8e88f1c55bf69fa8b2aa27c1c404a3d.tar.xz samba-02f2684dd8e88f1c55bf69fa8b2aa27c1c404a3d.zip |
s3:smbd: Implementation of SMB2.1 and SMB3.0 leases.
Pair-Programmed-With: Jeremy Allison <jra@samba.org>
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/smbd/files.c')
-rw-r--r-- | source3/smbd/files.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/smbd/files.c b/source3/smbd/files.c index 91eddb879b..1ad601abcd 100644 --- a/source3/smbd/files.c +++ b/source3/smbd/files.c @@ -490,6 +490,14 @@ void fsp_free(files_struct *fsp) fsp->fh->ref_count--; } + if (fsp->lease != NULL) { + if (fsp->lease->ref_count == 1) { + TALLOC_FREE(fsp->lease); + } else { + fsp->lease->ref_count--; + } + } + fsp->conn->num_files_open--; /* this is paranoia, just in case someone tries to reuse the |