summaryrefslogtreecommitdiff
path: root/source3/client/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/client/client.c')
-rw-r--r--source3/client/client.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index c40c04e9c6..adcbffe6fa 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -747,11 +747,11 @@ static void do_list_helper(const char *mntpoint, file_info *f, const char *mask,
return;
}
p = strrchr_m(mask2,CLI_DIRSEP_CHAR);
- if (!p) {
- TALLOC_FREE(dir);
- return;
+ if (p) {
+ p[1] = 0;
+ } else {
+ mask2[0] = '\0';
}
- p[1] = 0;
mask2 = talloc_asprintf_append(mask2,
"%s%s*",
f->name,