[issue15977] Memory leak in _ssl.c

2012-09-20 Thread Daniel Sommermann
Daniel Sommermann added the comment: This patch looks good to me (it's exactly how I fixed it in my local build), although I'm not sure how to approve your patch so you can push it to the upstream. -- ___ Python tracker rep...@bugs.python.org http

[issue15977] Memory leak in _ssl.c

2012-09-19 Thread Daniel Sommermann
New submission from Daniel Sommermann: I noticed that the function _set_npn_protocols() has the following line: self-npn_protocols = PyMem_Malloc(protos.len); There is no check to see if self-npn_protocols is already allocated. Thus, multiple calls to _set_npn_protocols() will leak memory