There was an error while loading. Please reload this page.
formatfloat()
bytesobject.c
1 parent b7b641a commit 664141eCopy full SHA for 664141e
1 file changed
Objects/bytesobject.c
@@ -470,8 +470,10 @@ formatfloat(PyObject *v, int flags, int prec, int type,
470
len = strlen(p);
471
if (writer != NULL) {
472
str = _PyBytesWriter_Prepare(writer, str, len);
473
- if (str == NULL)
+ if (str == NULL) {
474
+ PyMem_Free(p);
475
return NULL;
476
+ }
477
memcpy(str, p, len);
478
PyMem_Free(p);
479
str += len;
0 commit comments