File: _mysql.c
Function: _mysql_NewException
Error: future use-after-free: ob_refcnt of return value is 1 too low
2934 static PyObject *
2935 _mysql_NewException(
2936 	PyObject *dict,
2937 	PyObject *edict,
2938 	char *name)
2939 {
2940 	PyObject *e;
2941 
2942 	if (!(e = PyDict_GetItemString(edict, name)))
when treating unknown char * from _mysql.c:2938 as non-NULL
when PyDict_GetItemString() succeeds
taking False path
return value was allocated at: 	if (!(e = PyDict_GetItemString(edict, name)))
ob_refcnt is now refs: 0 owned, 1 borrowed
2943 		return NULL;
2944 	if (PyDict_SetItemString(dict, name, e)) return NULL;
when PyDict_SetItemString() succeeds
taking False path
ob_refcnt is now refs: 0 owned, 2 borrowed
2945 #ifdef PYPY_VERSION
2946 	Py_INCREF(e);
2947 #endif
2948 	return e;
future use-after-free: ob_refcnt of return value is 1 too low
was expecting final owned ob_refcnt of return value to be 1 due to object being referenced by: return value but final ob_refcnt is refs: 0 owned, 2 borrowed
2949 }

File: _mysql.c
Function: _mysql_NewException
Error: returning (PyObject*)NULL without setting an exception
2934 static PyObject *
2935 _mysql_NewException(
2936 	PyObject *dict,
2937 	PyObject *edict,
2938 	char *name)
2939 {
2940 	PyObject *e;
2941 
2942 	if (!(e = PyDict_GetItemString(edict, name)))
when treating unknown char * from _mysql.c:2938 as non-NULL
PyDict_GetItemString does not find string
taking True path
2943 		return NULL;
returning (PyObject*)NULL without setting an exception
2944 	if (PyDict_SetItemString(dict, name, e)) return NULL;
2945 #ifdef PYPY_VERSION
2946 	Py_INCREF(e);
2947 #endif
2948 	return e;
2949 }