Skip to content

bpo-32013: _pickle: Add missing Py_DECREF in error case in fast_save_enter()#4384

Merged
serhiy-storchaka merged 1 commit into
python:masterfrom
lioncash:decref
Nov 13, 2017
Merged

bpo-32013: _pickle: Add missing Py_DECREF in error case in fast_save_enter()#4384
serhiy-storchaka merged 1 commit into
python:masterfrom
lioncash:decref

Conversation

@lioncash

@lioncash lioncash commented Nov 13, 2017

Copy link
Copy Markdown
Contributor

Hi! As said on the issue filed. I'm new to the development/contribution process for Python, so I figured I'd start with something small, just get used to things.

As far as I understand, there should be a Py_DECREF in this conditional.

https://bugs.python.org/issue32013

@the-knights-who-say-ni

Copy link
Copy Markdown

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

Thanks again to your contribution and we look forward to looking at it!

Comment thread Modules/_pickle.c Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it is worth to add self->fast_nesting = -1; here and before other return 0 above.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done!

@serhiy-storchaka serhiy-storchaka added needs backport to 3.6 skip news type-bug An unexpected behavior, bug, or error labels Nov 13, 2017
@serhiy-storchaka

Copy link
Copy Markdown
Member

Thank you for your contribution @lioncash! It is not required for this simple change, but would be nice if you sign the PSF contributor agreement (CLA). Just for the case of your future more complex pull requests.

@serhiy-storchaka serhiy-storchaka merged commit f76231f into python:master Nov 13, 2017
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @lioncash for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6.
🐍🍒⛏🤖

@bedevere-bot

Copy link
Copy Markdown

GH-4385 is a backport of this pull request to the 3.6 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants