vtsuperdarn/davitpy — pull request #22 by asreimer (2013-09-13 06:39:08+00:00)
Title: Fixed memory leak in aacgmConvArr()

Changed PyList_Append to PyList_SetItem since PyList_Append can cause a memory leak (as per http://stackoverflow.com/questions/3512414/does-this-pylist-appendlist-py-buildvalue-leak). Also changed format string of Py_BuildValue from "OOO" to "NNN" since "O" will increment the reference count (http://docs.python.org/release/1.5.2/ext/buildValue.html) and this can cause a memory leak too (http://stackoverflow.com/questions/5508904/c-extension-in-python-return-py-buildvalue-memory-leak-problem).