fix possible null pointer deref - bug 1863647

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10204 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2008-01-12 23:06:06 +00:00
commit 4c335c9422

View file

@ -466,12 +466,13 @@ PySwigObject_dealloc(PyObject *v)
res = ((*meth)(mself, v)); res = ((*meth)(mself, v));
} }
Py_XDECREF(res); Py_XDECREF(res);
} else { }
const char *name = SWIG_TypePrettyName(ty);
#if !defined(SWIG_PYTHON_SILENT_MEMLEAK) #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
printf("swig/python detected a memory leak of type '%s', no destructor found.\n", name); else {
#endif const char *name = SWIG_TypePrettyName(ty);
printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
} }
#endif
} }
Py_XDECREF(next); Py_XDECREF(next);
PyObject_DEL(v); PyObject_DEL(v);