From: Brett Cannon Date: Thu, 25 May 2006 20:44:08 +0000 (+0000) Subject: Swap out bare malloc()/free() use for PyMem_MALLOC()/PyMem_FREE() . X-Git-Tag: v2.5b1~514 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0ed05875b24191c53a36520e4727c2c18c160f0e;p=python Swap out bare malloc()/free() use for PyMem_MALLOC()/PyMem_FREE() . --- diff --git a/Python/pystrtod.c b/Python/pystrtod.c index db4cad17d7..8a71c285a9 100644 --- a/Python/pystrtod.c +++ b/Python/pystrtod.c @@ -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 {