[Python-bugs-list] [ python-Bugs-472798 ] SSL in non-blocking mode (original) (raw)
noreply@sourceforge.net noreply@sourceforge.net
Fri, 19 Oct 2001 07:26:33 -0700
- Previous message: [Python-bugs-list] [ python-Bugs-469972 ] xmlrpclib won't marshal new types
- Next message: [Python-bugs-list] [ python-Bugs-472801 ] Python Advocacy HOWTO R0.03 URLs broken
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Bugs item #472798, was opened at 2001-10-19 07:26 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=472798&group_id=5470
Category: Python Library Group: Python 2.1.1 Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: SSL in non-blocking mode
Initial Comment: There is a memory leak when you use SSL sockets in Non-blocking mode.
The fix that works for me: In socketmodule.c, in function SSL_SSLRead() Add a Py_DECREF(buf); to the default in the switch statement.
Below is the code to change...
Change the switch statement from:
switch (res) { case SSL_ERROR_NONE: assert(count > 0); break; case SSL_ERROR_ZERO_RETURN: /* normal EOF */ assert(count == 0); break; default: return PyErr_SetFromErrno(SSLErrorObject); }
To
switch (res) { case SSL_ERROR_NONE: assert(count > 0); break; case SSL_ERROR_ZERO_RETURN: /* normal EOF */ assert(count == 0); break; default: Py_DECREF(buf); return PyErr_SetFromErrno(SSLErrorObject); }
Note the Py_DECREF(buf); in the default case
You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=472798&group_id=5470
- Previous message: [Python-bugs-list] [ python-Bugs-469972 ] xmlrpclib won't marshal new types
- Next message: [Python-bugs-list] [ python-Bugs-472801 ] Python Advocacy HOWTO R0.03 URLs broken
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]