Fixed leak of dims in MatND creates

This commit is contained in:
James Bowman
2011-01-19 01:43:45 +00:00
parent 06b06d5f85
commit 8503f75212
2 changed files with 3 additions and 1 deletions

View File

@@ -2793,6 +2793,7 @@ static PyObject *pycvCreateMatNDHeader(PyObject *self, PyObject *args)
m->data = Py_None;
Py_INCREF(m->data);
delete [] dims.i;
return (PyObject*)m;
}
@@ -2806,6 +2807,7 @@ static PyObject *pycvCreateMatND(PyObject *self, PyObject *args)
return NULL;
cvmatnd_t *m = PyObject_NEW(cvmatnd_t, &cvmatnd_Type);
ERRWRAP(m->a = cvCreateMatND(dims.count, dims.i, type));
delete [] dims.i;
return pythonize_CvMatND(m);
}