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