There was an error while loading. Please reload this page.
formatfloat()
bytesobject.c
1 parent b820499 commit b1a74a1Copy full SHA for b1a74a1
1 file changed
Objects/bytesobject.c
@@ -434,8 +434,10 @@ formatfloat(PyObject *v, int flags, int prec, int type,
434
len = strlen(p);
435
if (writer != NULL) {
436
str = _PyBytesWriter_Prepare(writer, str, len);
437
- if (str == NULL)
+ if (str == NULL) {
438
+ PyMem_Free(p);
439
return NULL;
440
+ }
441
memcpy(str, p, len);
442
PyMem_Free(p);
443
str += len;
0 commit comments