some servers don't return a fs_type and dev_type
authorAndrew Tridgell <tridge@samba.org>
Fri, 15 Aug 2003 15:14:14 +0000 (15:14 +0000)
committerAndrew Tridgell <tridge@samba.org>
Fri, 15 Aug 2003 15:14:14 +0000 (15:14 +0000)
source/libcli/raw/clitree.c

index 60e8610bd8b2ebee688dc2f50d66ec61b386067f..a088ae7023c83afb759053d79893efefedd33c41 100644 (file)
@@ -283,8 +283,12 @@ NTSTATUS cli_tree_full_connection(struct cli_tree **ret_tree,
        }
 
        tree->tid = tcon.tconx.out.cnum;
-       tree->device = talloc_strdup(tree->mem_ctx, tcon.tconx.out.dev_type);
-       tree->fs_type = talloc_strdup(tree->mem_ctx, tcon.tconx.out.fs_type);
+       if (tcon.tconx.out.dev_type) {
+               tree->device = talloc_strdup(tree->mem_ctx, tcon.tconx.out.dev_type);
+       }
+       if (tcon.tconx.out.fs_type) {
+               tree->fs_type = talloc_strdup(tree->mem_ctx, tcon.tconx.out.fs_type);
+       }
 
        talloc_destroy(mem_ctx);