summaryrefslogtreecommitdiff
path: root/source3/libsmb/clidfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb/clidfs.c')
-rw-r--r--source3/libsmb/clidfs.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c
index 6393f654c0..037c0d6b26 100644
--- a/source3/libsmb/clidfs.c
+++ b/source3/libsmb/clidfs.c
@@ -208,8 +208,12 @@ static void cli_cm_set_mntpoint( struct cli_state *c, const char *mnt )
}
if ( p ) {
- pstrcpy( p->mount, mnt );
- clean_name(p->mount);
+ char *name = clean_name(NULL, p->mount);
+ if (!name) {
+ return;
+ }
+ pstrcpy( p->mount, name );
+ TALLOC_FREE(name);
}
}