Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
f76231f8
Commit
f76231f8
authored
Nov 13, 2017
by
Mat M
Committed by
Serhiy Storchaka
Nov 13, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-32013: _pickle: Add missing Py_DECREF in error case in fast_save_enter() (#4384)
parent
8acaa31e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
Modules/_pickle.c
Modules/_pickle.c
+5
-1
No files found.
Modules/_pickle.c
View file @
f76231f8
...
...
@@ -1777,8 +1777,10 @@ fast_save_enter(PicklerObject *self, PyObject *obj)
}
}
key
=
PyLong_FromVoidPtr
(
obj
);
if
(
key
==
NULL
)
if
(
key
==
NULL
)
{
self
->
fast_nesting
=
-
1
;
return
0
;
}
if
(
PyDict_GetItemWithError
(
self
->
fast_memo
,
key
))
{
Py_DECREF
(
key
);
PyErr_Format
(
PyExc_ValueError
,
...
...
@@ -1789,6 +1791,8 @@ fast_save_enter(PicklerObject *self, PyObject *obj)
return
0
;
}
if
(
PyErr_Occurred
())
{
Py_DECREF
(
key
);
self
->
fast_nesting
=
-
1
;
return
0
;
}
if
(
PyDict_SetItem
(
self
->
fast_memo
,
key
,
Py_None
)
<
0
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment