◐ Shell
clean mode source ↗

bpo-40334: Improvements to error-handling code in the PEG parser by lysnikolaou · Pull Request #20003 · python/cpython

Following improvements are implemented in this PR:
- `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.

@lysnikolaou

@lysnikolaou

pablogsal

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>

@lysnikolaou

arturoescaip pushed a commit to arturoescaip/cpython that referenced this pull request

May 24, 2020
…honGH-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>