diff options
author | Andrew Tridgell <tridge@samba.org> | 2006-05-23 06:19:35 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:08:30 -0500 |
commit | d8223e4b94afe04f6b2fcf1a8ee4ba2d5cf16d22 (patch) | |
tree | 2952de382a728ad85171fa9608a92fe1a67bac6d | |
parent | 0f881ff069cdd81060fb97f1cb08503dc6f7c436 (diff) | |
download | samba-d8223e4b94afe04f6b2fcf1a8ee4ba2d5cf16d22.tar.gz samba-d8223e4b94afe04f6b2fcf1a8ee4ba2d5cf16d22.tar.bz2 samba-d8223e4b94afe04f6b2fcf1a8ee4ba2d5cf16d22.zip |
r15833: fixed two delete on close memory leaks
(This used to be commit f3274e8f78f28a51313e98934b208c2deb9ae9ea)
-rw-r--r-- | source4/ntvfs/posix/pvfs_open.c | 8 |
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; |