[PYTHON-CRYPTO] Memoryleak in SSL.Connection

Ng Pheng Siong ngps at POST1.COM
Thu Apr 8 03:07:24 CEST 2004


On Thu, Apr 01, 2004 at 09:49:07PM +0200, Andre Reitz wrote:
> here is my patch, which should work in any case:
> (but not so efficient)

Is it easy to induce/observe the leak?

I think one possible cheap way to fix the cyclical references is to do this

    self._write_bio = None
    self._write_nbio = None
    self._read_bio = None
    self._read_nbio = None

at a strategic spot, perhaps in close(). This gets rid of the mode test at
every invocation of read/write/send/recv.

What do you think?

--
Ng Pheng Siong <ngps at netmemetic.com>

http://firewall.rulemaker.net -+- Firewall Change Management & Version Control
http://sandbox.rulemaker.net/ngps -+- Open Source Python Crypto & SSL




More information about the python-crypto mailing list