File: py_GeoIP.c
Function: GeoIP_new_Py
Error: ob_refcnt of '*GeoIP' is 1 too high
35 static PyObject*
36 GeoIP_new_Py(PyObject* self, PyObject *args) {
37   GeoIP_GeoIPObject* GeoIP;
38   int flags;
39 
40   if (!PyArg_ParseTuple(args, "i", &flags)) {
when PyArg_ParseTuple() succeeds
taking False path
41     return NULL;
42   }
43 
44   GeoIP = PyObject_New(GeoIP_GeoIPObject, &GeoIP_GeoIPType);
when _PyObject_New() succeeds
_PyObject_New allocated at:   GeoIP = PyObject_New(GeoIP_GeoIPObject, &GeoIP_GeoIPType);
ob_refcnt is now refs: 1 + N where N >= 0
45 
46   GeoIP->gi = GeoIP_new(flags);
47 
48   if (!GeoIP->gi) {
when treating unknown struct GeoIP * from py_GeoIP.c:46 as NULL
taking True path
49     PyErr_SetString(PyGeoIPError,  "Can't create GeoIP->gi object");
calling PyErr_SetString()
50     return NULL;
51   }
52 
53   return (PyObject*)GeoIP;
54 }
ob_refcnt of '*GeoIP' is 1 too high
was expecting final ob_refcnt to be N + 0 (for some unknown N)
but final ob_refcnt is N + 1

File: py_GeoIP.c
Function: GeoIP_new_Py
Error: dereferencing NULL (GeoIP->gi) at py_GeoIP.c:48
35 static PyObject*
36 GeoIP_new_Py(PyObject* self, PyObject *args) {
37   GeoIP_GeoIPObject* GeoIP;
38   int flags;
39 
40   if (!PyArg_ParseTuple(args, "i", &flags)) {
when PyArg_ParseTuple() succeeds
taking False path
41     return NULL;
42   }
43 
44   GeoIP = PyObject_New(GeoIP_GeoIPObject, &GeoIP_GeoIPType);
when _PyObject_New() fails
45 
46   GeoIP->gi = GeoIP_new(flags);
dereferencing NULL (GeoIP->gi) at py_GeoIP.c:48
47 
48   if (!GeoIP->gi) {
49     PyErr_SetString(PyGeoIPError,  "Can't create GeoIP->gi object");
50     return NULL;
51   }
52 
53   return (PyObject*)GeoIP;
54 }