Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
Closed
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Lines 429 to 443 in 206f05a
| p=PyOS_double_to_string(x, type, prec, dtoa_flags, NULL); | |
| if (p==NULL) | |
| returnNULL; | |
| len=strlen(p); | |
| if (writer!=NULL){ | |
| str=_PyBytesWriter_Prepare(writer, str, len); | |
| if (str==NULL) | |
| returnNULL; | |
| memcpy(str, p, len); | |
| PyMem_Free(p); | |
| str+=len; | |
| returnstr; | |
| } |
At line 438, object
p won't be freed if _PyBytesWriter_Prepare fails (returns NULL) and thus become a memory leak.Linked PRs
Metadata
Metadata
Assignees
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error