X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/8346c62a95d601f2516059cccb4784fe36fe3e9d..2907af472d1f33b3c422cb9f601c121b242aa9c7:/options.c diff --git a/options.c b/options.c index 0377ef6f..546f63d8 100644 --- a/options.c +++ b/options.c @@ -1421,14 +1421,16 @@ int parse_arguments(int *argc_p, const char ***argv_p) arg = sanitize_path(NULL, arg, NULL, 0, SP_DEFAULT); if (daemon_filter_list.head) { int rej; - char *dir, *cp = strdup(arg); + char *cp = strdup(arg); if (!cp) out_of_memory("parse_arguments"); if (!*cp) - goto options_rejected; - dir = cp + (*cp == '/' ? module_dirlen : 0); - clean_fname(dir, CFN_COLLAPSE_DOT_DOT_DIRS); - rej = check_filter(&daemon_filter_list, FLOG, dir, 0) < 0; + rej = 1; + else { + char *dir = cp + (*cp == '/' ? module_dirlen : 0); + clean_fname(dir, CFN_COLLAPSE_DOT_DOT_DIRS); + rej = check_filter(&daemon_filter_list, FLOG, dir, 0) < 0; + } free(cp); if (rej) goto options_rejected;