bpo-36367: Free buffer if realloc fails in tokenize.c by pablogsal ยท Pull Request #12442 ยท python/cpython

@pablogsal

matrixise

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had the same solution, seems to be fine for me.

remilapeyre

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@remilapeyre

vstinner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move result declaration where it's used? Python 3.8 now allows C99 ;-) (see PEP 7)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! :)

@pablogsal

@pablogsal

remilapeyre

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pablogsal Yes it is, I think you patch is correct now.

@miss-islington

Thanks @pablogsal for the PR ๐ŸŒฎ๐ŸŽ‰.. I'm working now to backport this PR to: 2.7.
๐Ÿ๐Ÿ’โ›๐Ÿค–

@miss-islington

Thanks @pablogsal for the PR ๐ŸŒฎ๐ŸŽ‰.. I'm working now to backport this PR to: 3.7.
๐Ÿ๐Ÿ’โ›๐Ÿค–

@bedevere-bot

@bedevere-bot

vstinner added a commit that referenced this pull request

Mar 20, 2019

vstinner added a commit that referenced this pull request

Mar 20, 2019