[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://bugs.python.org/issue15977
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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. There should be a 
check to see if it is non-null and free the memory pointed to by 
self-npn_protocols before the malloc unless I am missing something.

--
components: IO
messages: 170774
nosy: Daniel.Sommermann, pitrou
priority: normal
severity: normal
status: open
title: Memory leak in _ssl.c
versions: Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15977
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com