summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/compile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 4340522..373363f 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -1954,7 +1954,7 @@ com_factor(struct compiling *c, node *n)
return;
}
if (childtype == MINUS) {
- char *s = malloc(strlen(STR(pnum)) + 2);
+ char *s = PyMem_Malloc(strlen(STR(pnum)) + 2);
if (s == NULL) {
com_error(c, PyExc_MemoryError, "");
com_addbyte(c, 255);
@@ -1962,7 +1962,7 @@ com_factor(struct compiling *c, node *n)
}
s[0] = '-';
strcpy(s + 1, STR(pnum));
- free(STR(pnum));
+ PyMem_Free(STR(pnum));
STR(pnum) = s;
}
com_atom(c, patom);