diff options
Diffstat (limited to 'source3/smbd/vfs.c')
-rw-r--r-- | source3/smbd/vfs.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index 2be6c54a88..60320e6069 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -261,6 +261,27 @@ void vfs_remove_fsp_extension(vfs_handle_struct *handle, files_struct *fsp) } } +void vfs_remove_all_fsp_extensions(files_struct *fsp) +{ + struct vfs_fsp_data *curr; + struct vfs_fsp_data *prev; + + for (curr = fsp->vfs_extension, prev = NULL; + curr; + prev = curr, curr = curr->next) + { + if (prev) { + prev->next = curr->next; + } else { + fsp->vfs_extension = curr->next; + } + if (curr->destroy) { + curr->destroy(EXT_DATA_AREA(curr)); + } + TALLOC_FREE(curr); + } +} + void *vfs_memctx_fsp_extension(vfs_handle_struct *handle, files_struct *fsp) { struct vfs_fsp_data *head; |