File: | isys.c |
Function: | doMount |
Error: | ob_refcnt of '*tuple' is 1 too high |
183 static PyObject * doMount(PyObject * s, PyObject * args) {
184 char *err = NULL, *fs, *device, *mntpoint, *flags = NULL;
185 int rc;
186
187 if (!PyArg_ParseTuple(args, "sss|z", &fs, &device, &mntpoint,
188 &flags)) return NULL;
when PyArg_ParseTuple() succeeds
taking False path
189
190 rc = doPwMount(device, mntpoint, fs, flags, &err);
191 if (rc == IMOUNT_ERR_ERRNO)
192 PyErr_SetFromErrno(PyExc_SystemError);
when considering range: -0x80000000 <= value <= -2
taking False path
193 else if (rc) {
194 PyObject *tuple = PyTuple_New(2);
taking True path
195
when PyTuple_New() succeeds
PyTupleObject allocated at: PyObject *tuple = PyTuple_New(2);
ob_refcnt is now refs: 1 + N where N >= 0
196 PyTuple_SetItem(tuple, 0, PyInt_FromLong(rc));
197
when PyInt_FromLong() succeeds
when PyTuple_SetItem() succeeds
198 if (err == NULL) {
199 Py_INCREF(Py_None);
when treating unknown char * * from isys.c:191 as non-NULL
taking False path
200 PyTuple_SetItem(tuple, 1, Py_None);
201 } else {
202 PyTuple_SetItem(tuple, 1, PyString_FromString(err));
203 }
when PyString_FromString() succeeds
when PyTuple_SetItem() succeeds
204
205 PyErr_SetObject(PyExc_SystemError, tuple);
206 }
calling PyErr_SetObject()
ob_refcnt is now refs: 1 + N where N >= 1
207
208 if (rc) return NULL;
209
taking True path
210 Py_INCREF(Py_None);
211 return Py_None;
212 }
213
File: | isys.c |
Function: | doMount |
Error: | calling PyTuple_SetItem with NULL as argument 1 (tuple) at isys.c:197 |
183 static PyObject * doMount(PyObject * s, PyObject * args) {
184 char *err = NULL, *fs, *device, *mntpoint, *flags = NULL;
185 int rc;
186
187 if (!PyArg_ParseTuple(args, "sss|z", &fs, &device, &mntpoint,
188 &flags)) return NULL;
when PyArg_ParseTuple() succeeds
taking False path
189
190 rc = doPwMount(device, mntpoint, fs, flags, &err);
191 if (rc == IMOUNT_ERR_ERRNO)
192 PyErr_SetFromErrno(PyExc_SystemError);
when considering range: -0x80000000 <= value <= -2
taking False path
193 else if (rc) {
194 PyObject *tuple = PyTuple_New(2);
taking True path
195
when PyTuple_New() fails
196 PyTuple_SetItem(tuple, 0, PyInt_FromLong(rc));
197
when PyInt_FromLong() succeeds
calling PyTuple_SetItem with NULL as argument 1 (tuple) at isys.c:197
PyTuple_SetItem() invokes Py_TYPE() on the pointer via the PyTuple_Check() macro, thus accessing (NULL)->ob_type
found 3 similar trace(s) to this
198 if (err == NULL) {
199 Py_INCREF(Py_None);
200 PyTuple_SetItem(tuple, 1, Py_None);
201 } else {
202 PyTuple_SetItem(tuple, 1, PyString_FromString(err));
203 }
204
205 PyErr_SetObject(PyExc_SystemError, tuple);
206 }
207
208 if (rc) return NULL;
209
210 Py_INCREF(Py_None);
211 return Py_None;
212 }
213