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
5f95257e
Commit
5f95257e
authored
Nov 25, 2008
by
Amaury Forgeot d'Arc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#4373: Reference leak in the pickle module.
Reviewed by Brett Cannon.
parent
7317c1ef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
Misc/NEWS
Misc/NEWS
+2
-0
Modules/_pickle.c
Modules/_pickle.c
+2
-0
No files found.
Misc/NEWS
View file @
5f95257e
...
@@ -22,6 +22,8 @@ Core and Builtins
...
@@ -22,6 +22,8 @@ Core and Builtins
Library
Library
-------
-------
- Issue #4373: Corrected a potential reference leak in the pickle module.
- Issue #4382: dbm.dumb did not specify the expected file encoding for opened
- Issue #4382: dbm.dumb did not specify the expected file encoding for opened
files.
files.
...
...
Modules/_pickle.c
View file @
5f95257e
...
@@ -486,11 +486,13 @@ unpickler_read(UnpicklerObject *self, char **s, Py_ssize_t n)
...
@@ -486,11 +486,13 @@ unpickler_read(UnpicklerObject *self, char **s, Py_ssize_t n)
PyErr_SetString
(
PyExc_ValueError
,
PyErr_SetString
(
PyExc_ValueError
,
"read() from the underlying stream did not"
"read() from the underlying stream did not"
"return bytes"
);
"return bytes"
);
Py_DECREF
(
data
);
return
-
1
;
return
-
1
;
}
}
if
(
PyBytes_GET_SIZE
(
data
)
!=
n
)
{
if
(
PyBytes_GET_SIZE
(
data
)
!=
n
)
{
PyErr_SetNone
(
PyExc_EOFError
);
PyErr_SetNone
(
PyExc_EOFError
);
Py_DECREF
(
data
);
return
-
1
;
return
-
1
;
}
}
...
...
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