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.

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to