summaryrefslogtreecommitdiff
path: root/source4/ntvfs
diff options
context:
space:
mode:
Diffstat (limited to 'source4/ntvfs')
-rw-r--r--source4/ntvfs/posix/pvfs_open.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c
index fd382ba1d9..2102de29f5 100644
--- a/source4/ntvfs/posix/pvfs_open.c
+++ b/source4/ntvfs/posix/pvfs_open.c
@@ -58,7 +58,7 @@ static int pvfs_dir_handle_destructor(void *p)
{
struct pvfs_file_handle *h = p;
int open_count;
- char *path;
+ char *path = NULL;
if (h->name->stream_name == NULL &&
pvfs_delete_on_close_set(h->pvfs, h, &open_count, &path) &&
@@ -75,6 +75,8 @@ static int pvfs_dir_handle_destructor(void *p)
}
}
+ talloc_free(path);
+
if (h->have_opendb_entry) {
struct odb_lock *lck;
NTSTATUS status;
@@ -414,7 +416,7 @@ static int pvfs_handle_destructor(void *p)
{
struct pvfs_file_handle *h = p;
int open_count;
- char *path;
+ char *path = NULL;
/* the write time is no longer sticky */
if (h->sticky_write_time) {
@@ -464,6 +466,8 @@ static int pvfs_handle_destructor(void *p)
}
}
+ talloc_free(path);
+
if (h->have_opendb_entry) {
struct odb_lock *lck;
NTSTATUS status;