|
From: <md...@us...> - 2009-04-23 14:22:37
|
Revision: 7061
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7061&view=rev
Author: mdboom
Date: 2009-04-23 14:22:27 +0000 (Thu, 23 Apr 2009)
Log Message:
-----------
Fix theoretical memory leak.
Modified Paths:
--------------
trunk/matplotlib/src/cntr.c
Modified: trunk/matplotlib/src/cntr.c
===================================================================
--- trunk/matplotlib/src/cntr.c 2009-04-23 14:22:11 UTC (rev 7060)
+++ trunk/matplotlib/src/cntr.c 2009-04-23 14:22:27 UTC (rev 7061)
@@ -1410,7 +1410,7 @@
PyObject *
cntr_trace(Csite *site, double levels[], int nlevels, int points, long nchunk)
{
- PyObject *c_list;
+ PyObject *c_list = NULL;
double *xp0;
double *yp0;
long *nseg0;
@@ -1502,6 +1502,7 @@
error:
PyMem_Free(xp0); PyMem_Free(yp0); PyMem_Free(nseg0);
site->xcp = NULL; site->ycp = NULL;
+ Py_XDECREF(c_list);
return NULL;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|