summaryrefslogtreecommitdiff
path: root/source4/libcli/raw/clitree.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/raw/clitree.c')
-rw-r--r--source4/libcli/raw/clitree.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/libcli/raw/clitree.c b/source4/libcli/raw/clitree.c
index 60e8610bd8..a088ae7023 100644
--- a/source4/libcli/raw/clitree.c
+++ b/source4/libcli/raw/clitree.c
@@ -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);