Fix memory leak in float literal parsing

Issue=93 Contributed by Benoit Jacob git-svn-id: https://angleproject.googlecode.com/svn/trunk@504 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 7595a122
...@@ -18,7 +18,10 @@ ...@@ -18,7 +18,10 @@
double atof_dot(const char *str) double atof_dot(const char *str)
{ {
#ifdef _MSC_VER #ifdef _MSC_VER
return _atof_l(str, _create_locale(LC_NUMERIC, "C")); _locale_t l = _create_locale(LC_NUMERIC, "C");
double result = _atof_l(str, l);
_free_locale(l);
return result;
#else #else
double result; double result;
std::istringstream s(str); std::istringstream s(str);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment