aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/parse_execution.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2015-08-19 11:35:24 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2015-08-19 11:35:24 -0700
commitb59904632dd30a5101d459afca56fa3c48f48f12 (patch)
tree917af0d2dff5492b209bb024de7dc69d90619e5d /src/parse_execution.cpp
parentc1b9b27f860235e604cc4eed85a87fdc01b0b4f1 (diff)
Rewrite parse_util_unescape_wildcards
Make it simpler, and use wcstring instead of wcsdup
Diffstat (limited to 'src/parse_execution.cpp')
-rw-r--r--src/parse_execution.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/parse_execution.cpp b/src/parse_execution.cpp
index e02ad9d7..43e886f5 100644
--- a/src/parse_execution.cpp
+++ b/src/parse_execution.cpp
@@ -613,9 +613,8 @@ parse_execution_result_t parse_execution_context_t::run_switch_statement(const p
const wcstring &arg = case_args.at(i);
/* Unescape wildcards so they can be expanded again */
- wchar_t *unescaped_arg = parse_util_unescape_wildcards(arg.c_str());
+ wcstring unescaped_arg = parse_util_unescape_wildcards(arg);
bool match = wildcard_match(switch_value_expanded, unescaped_arg);
- free(unescaped_arg);
/* If this matched, we're done */
if (match)