[docs] Memory leak in sample "Noddy" extension module code
paulkoning at comcast.net
Mon Sep 12 16:51:09 CEST 2011
There's a memory leak in the sample code for the Noddy extension module in the "Extending and Embedding" manual for 2.7.2. Consider for example section 2.1.2, page 36 in the US page size PDF file, function Noddy_name().
There are two places where Py_DECREF(format) is needed, and both are missing. One is in the error handler for the creation of the "args" object. The other is after the call to PyString_Format(format,args).
The error is repeated a couple of times in the assorted variants of the Noddy module example.
More information about the docs