[New-bugs-announce] [issue15977] Memory leak in _ssl.c

Daniel Sommermann report at bugs.python.org
Thu Sep 20 00:02:00 CEST 2012


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 <report at bugs.python.org>
<http://bugs.python.org/issue15977>
_______________________________________


More information about the New-bugs-announce mailing list