This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: _ssl.c: refleak
Type: resource usage Stage: resolved
Components: Extension Modules Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Suman.Saha, pitrou, python-dev, skrah
Priority: normal Keywords:

Created on 2011-09-20 14:51 by Suman.Saha, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
python_patch2 Suman.Saha, 2011-09-20 14:51 Patch review
Messages (4)
msg144331 - (view) Author: Suman Saha (Suman.Saha) Date: 2011-09-20 14:51
Something that is allocated using PyList_New is not freed on one error path.
msg144370 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2011-09-21 07:31
This doesn't look right to me: If (rdn != NULL) && (PyList_Size(rdn) > 0),
rdn is already decremented.

There is a leak though if  (rdn != NULL) && (PyList_Size(rdn) == 0).
msg153438 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-02-15 21:34
New changeset f3a4c2b34973 by Antoine Pitrou in branch '3.2':
Issue #13014: Fix a possible reference leak in SSLSocket.getpeercert().
http://hg.python.org/cpython/rev/f3a4c2b34973

New changeset 9ab501b3e22d by Antoine Pitrou in branch 'default':
Issue #13014: Fix a possible reference leak in SSLSocket.getpeercert().
http://hg.python.org/cpython/rev/9ab501b3e22d

New changeset 111dcae41ff7 by Antoine Pitrou in branch '2.7':
Issue #13014: Fix a possible reference leak in SSLSocket.getpeercert().
http://hg.python.org/cpython/rev/111dcae41ff7
msg153439 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-02-15 21:35
I've fixed the actual leak. Thanks!
History
Date User Action Args
2022-04-11 14:57:21adminsetgithub: 57223
2012-02-15 21:35:18pitrousetstatus: open -> closed

versions: + Python 2.7, Python 3.2
nosy: + pitrou

messages: + msg153439
resolution: fixed
stage: resolved
2012-02-15 21:34:40python-devsetnosy: + python-dev
messages: + msg153438
2011-09-21 19:30:03skrahsettitle: _ssl.c: resource is not released before returning from the function -> _ssl.c: refleak
components: + Extension Modules
versions: + Python 3.3
2011-09-21 08:06:22skrahsettitle: Resource is not released before returning from the functiion -> _ssl.c: resource is not released before returning from the function
2011-09-21 07:31:23skrahsetnosy: + skrah
messages: + msg144370
2011-09-20 14:51:15Suman.Sahacreate