r114: - remember to initialise open_files
authorAndrew Tridgell <tridge@samba.org>
Wed, 7 Apr 2004 11:46:00 +0000 (11:46 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:51:09 +0000 (12:51 -0500)
- use talloc_p when possible
(This used to be commit db7f7ac165ded15f0b8157eb899ea6828a033da9)

source4/ntvfs/simple/vfs_simple.c

index 4802c11d6a3eca9d1a36255d9bbe53e138e8d5f1..c2ad7d7aa4d3f5a97ddd1c64e4cf210b56a96e35 100644 (file)
@@ -47,12 +47,13 @@ static NTSTATUS svfs_connect(struct request_context *req, const char *sharename)
        struct tcon_context *conn = req->conn;
        struct svfs_private *private;
 
-       conn->ntvfs_private = talloc(conn->mem_ctx, sizeof(struct svfs_private));
+       conn->ntvfs_private = talloc_p(conn->mem_ctx, struct svfs_private);
 
        private = conn->ntvfs_private;
 
        private->next_search_handle = 0;
        private->connectpath = talloc_strdup(conn->mem_ctx, lp_pathname(conn->service));
+       private->open_files = NULL;
 
        /* the directory must exist */
        if (stat(private->connectpath, &st) != 0 || !S_ISDIR(st.st_mode)) {