diff options
author | Lysandros Nikolaou <lisandrosnik@gmail.com> | 2020-05-17 06:19:23 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-17 04:19:23 +0100 |
commit | 2c8cd06afe8e0abb52367f85978f19b88e2df53e (patch) | |
tree | ea90af6b2975c27c85f491e2eda51911c15c3d6f /Python/errors.c | |
parent | 6341fc7257d89d798675ad6e425f7eb0b6f2b4bb (diff) | |
download | cpython-git-2c8cd06afe8e0abb52367f85978f19b88e2df53e.tar.gz |
bpo-40334: Improvements to error-handling code in the PEG parser (GH-20003)
The following improvements are implemented in this commit:
- `p->error_indicator` is set, in case malloc or realloc fail.
- Avoid memory leaks in the case that realloc fails.
- Call `PyErr_NoMemory()` instead of `PyErr_Format()`, because it requires no memory.
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Diffstat (limited to 'Python/errors.c')
0 files changed, 0 insertions, 0 deletions