From: Victor Stinner Date: Tue, 26 Apr 2016 10:35:13 +0000 (+0200) Subject: Issue #25349, #26249: Fix memleak in formatfloat() X-Git-Tag: v3.6.0a1~112 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=71dc3d878a44c8fc6b9b1743750600d4902538f2;p=thirdparty%2FPython%2Fcpython.git Issue #25349, #26249: Fix memleak in formatfloat() --- diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index 701ae9df8a80..296c73b1cd04 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; }