Author: tridge
Date: 2006-05-23 06:19:35 +0000 (Tue, 23 May 2006)
New Revision: 15833

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=15833

Log:

fixed two delete on close memory leaks

Modified:
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c


Changeset:
Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c   2006-05-23 06:06:08 UTC 
(rev 15832)
+++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c   2006-05-23 06:19:35 UTC 
(rev 15833)
@@ -58,7 +58,7 @@
 {
        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 @@
                }
        }
 
+       talloc_free(path);
+
        if (h->have_opendb_entry) {
                struct odb_lock *lck;
                NTSTATUS status;
@@ -414,7 +416,7 @@
 {
        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 @@
                }
        }
 
+       talloc_free(path);
+
        if (h->have_opendb_entry) {
                struct odb_lock *lck;
                NTSTATUS status;

Reply via email to