From 200aec7db479a3275f08c80af987375c95c8d8cc Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sun, 23 Sep 2007 19:10:10 +0000 Subject: [PATCH] Avoid a checker warning about unfreed memory. --- options.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/options.c b/options.c index 4e26ebef..ff7c1431 100644 --- a/options.c +++ b/options.c @@ -1003,15 +1003,17 @@ int parse_arguments(int *argc_p, const char ***argv_p, int frommain) if (sanitize_paths) arg = sanitize_path(NULL, arg, NULL, 0, NULL); if (server_filter_list.head) { + int rej; char *cp = strdup(arg); if (!cp) out_of_memory("parse_arguments"); if (!*cp) goto options_rejected; clean_fname(cp, 1); - if (check_filter(&server_filter_list, cp, 0) < 0) - goto options_rejected; + rej = check_filter(&server_filter_list, cp, 0) < 0; free(cp); + if (rej) + goto options_rejected; } parse_filter_file(&filter_list, arg, opt == OPT_INCLUDE_FROM ? MATCHFLG_INCLUDE : 0, -- 2.34.1