Skip to content

Commit

Permalink
Fix theoretical memory leak.
Browse files Browse the repository at this point in the history
svn path=/trunk/matplotlib/; revision=7061
  • Loading branch information
mdboom committed Apr 23, 2009
1 parent e205c6a commit 472b7ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cntr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1410,7 +1410,7 @@ build_cntr_list_v2(long *np, double *xp, double *yp, int nparts, long ntotal)
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;
Expand Down Expand Up @@ -1502,6 +1502,7 @@ cntr_trace(Csite *site, double levels[], int nlevels, int points, long nchunk)
error:
PyMem_Free(xp0); PyMem_Free(yp0); PyMem_Free(nseg0);
site->xcp = NULL; site->ycp = NULL;
Py_XDECREF(c_list);
return NULL;
}

Expand Down

0 comments on commit 472b7ba

Please sign in to comment.