summaryrefslogtreecommitdiffstats
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/clidfs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c
index 80fba23f67..93f04c5074 100644
--- a/source3/libsmb/clidfs.c
+++ b/source3/libsmb/clidfs.c
@@ -280,13 +280,15 @@ static NTSTATUS do_connect(TALLOC_CTX *ctx,
static void cli_set_mntpoint(struct cli_state *cli, const char *mnt)
{
- char *name = clean_name(NULL, mnt);
+ TALLOC_CTX *frame = talloc_stackframe();
+ char *name = clean_name(frame, mnt);
if (!name) {
+ TALLOC_FREE(frame);
return;
}
TALLOC_FREE(cli->dfs_mountpoint);
cli->dfs_mountpoint = talloc_strdup(cli, name);
- TALLOC_FREE(name);
+ TALLOC_FREE(frame);
}
/********************************************************************