summaryrefslogtreecommitdiffstats
path: root/Objects/bytesobject.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-04-26 10:35:13 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-04-26 10:35:13 (GMT)
commit71dc3d878a44c8fc6b9b1743750600d4902538f2 (patch)
tree56f833cea9ced7d83d9a20544d074c91375c06b2 /Objects/bytesobject.c
parent45009778aa131b99bc95412390dae232d9f760a7 (diff)
downloadcpython-71dc3d878a44c8fc6b9b1743750600d4902538f2.zip
cpython-71dc3d878a44c8fc6b9b1743750600d4902538f2.tar.gz
cpython-71dc3d878a44c8fc6b9b1743750600d4902538f2.tar.bz2
Issue #25349, #26249: Fix memleak in formatfloat()
Diffstat (limited to 'Objects/bytesobject.c')
-rw-r--r--Objects/bytesobject.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index 701ae9d..296c73b 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -438,6 +438,7 @@ formatfloat(PyObject *v, int flags, int prec, int type,
if (str == NULL)
return NULL;
Py_MEMCPY(str, p, len);
+ PyMem_Free(p);
str += len;
return str;
}