From 51d7d5d0da8a1403db4bb738e0d16121a23a138e Mon Sep 17 00:00:00 2001 From: Siteshwar Vashisht Date: Thu, 19 Jan 2012 21:49:24 +0530 Subject: [PATCH] Fixed calls to expand_variables2() in expand.cpp --- expand.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/expand.cpp b/expand.cpp index 5b45e25a6..0813f776d 100644 --- a/expand.cpp +++ b/expand.cpp @@ -1422,7 +1422,7 @@ static int expand_variables2( wchar_t * in, std::vector &out, int } } -// free(in); + free(in); al_destroy( &var_item_list ); return is_ok; } @@ -1471,7 +1471,7 @@ static int expand_variables2( wchar_t * in, std::vector &out, int } else { -// free( in ); + free( in ); } return is_ok; @@ -2128,7 +2128,7 @@ int expand_string2( const wcstring &input, std::vector &output, in } else { - if(!expand_variables2( const_cast(next.c_str()), *out, next.size() - 1 )) + if(!expand_variables2( wcsdup(next.c_str()), *out, next.size() - 1 )) { return EXPAND_ERROR; }