Kaydet (Commit) 0ed05875 authored tarafından Brett Cannon's avatar Brett Cannon

Swap out bare malloc()/free() use for PyMem_MALLOC()/PyMem_FREE() .

üst 9d67d5e9
......@@ -101,7 +101,7 @@ PyOS_ascii_strtod(const char *nptr, char **endptr)
char *copy, *c;
/* We need to convert the '.' to the locale specific decimal point */
copy = (char *)malloc(end - nptr + 1 + decimal_point_len);
copy = (char *)PyMem_MALLOC(end - nptr + 1 + decimal_point_len);
c = copy;
memcpy(c, nptr, decimal_point_pos - nptr);
......@@ -122,7 +122,7 @@ PyOS_ascii_strtod(const char *nptr, char **endptr)
fail_pos = (char *)nptr + (fail_pos - copy);
}
free(copy);
PyMem_FREE(copy);
}
else {
......
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