aboutsummaryrefslogtreecommitdiffhomepage
path: root/expand.cpp
diff options
context:
space:
mode:
authorGravatar Siteshwar Vashisht <siteshwar@gmail.com>2012-01-19 21:49:24 +0530
committerGravatar Siteshwar Vashisht <siteshwar@gmail.com>2012-01-19 21:49:24 +0530
commit51d7d5d0da8a1403db4bb738e0d16121a23a138e (patch)
treeadc33e5c90578a9bb359e12deb2ef066ae6d369f /expand.cpp
parentc9595848310cd9b2c62b53310aea8942146f8b12 (diff)
Fixed calls to expand_variables2() in expand.cpp
Diffstat (limited to 'expand.cpp')
-rw-r--r--expand.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/expand.cpp b/expand.cpp
index 5b45e25a..0813f776 100644
--- a/expand.cpp
+++ b/expand.cpp
@@ -1422,7 +1422,7 @@ static int expand_variables2( wchar_t * in, std::vector<completion_t> &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<completion_t> &out, int
}
else
{
-// free( in );
+ free( in );
}
return is_ok;
@@ -2128,7 +2128,7 @@ int expand_string2( const wcstring &input, std::vector<completion_t> &output, in
}
else
{
- if(!expand_variables2( const_cast<wchar_t*>(next.c_str()), *out, next.size() - 1 ))
+ if(!expand_variables2( wcsdup(next.c_str()), *out, next.size() - 1 ))
{
return EXPAND_ERROR;
}