Commits

zeroth  committed 6c7f7ca

Fixed potential memory leak, but larger memory leak issue still present.

  • Participants
  • Parent commits 0da6685
  • Branches tylerthemovie

Comments (0)

Files changed (1)

File src/_gmovie.c

 	if(ret!=0)
 	{
 		//throw python error
-		if(PyErr_Occurred())
+		PyObject *er;
+		er=PyErr_Occurred();
+		Py_INCREF(er);
+		if(er)
 		{
 			PyErr_Print();
 		}
+		Py_DECREF(er);
 		Py_DECREF(is);
 		return is;
 	}