summaryrefslogtreecommitdiffstats
path: root/Python/errors.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/errors.c')
-rw-r--r--Python/errors.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/errors.c b/Python/errors.c
index ccc2ae3..9a2597b 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -334,7 +334,7 @@ PyErr_SetFromErrnoWithFilename(PyObject *exc, char *filename)
{
PyObject *name = filename ? PyString_FromString(filename) : NULL;
PyObject *result = PyErr_SetFromErrnoWithFilenameObject(exc, name);
- Py_DECREF(name);
+ Py_XDECREF(name);
return result;
}
@@ -444,7 +444,7 @@ PyObject *PyErr_SetFromWindowsErrWithFilename(
PyObject *result = PyErr_SetExcFromWindowsErrWithFilenameObject(
PyExc_WindowsError,
ierr, name);
- Py_XDECREF(result);
+ Py_XDECREF(name);
return result;
}
@@ -459,7 +459,7 @@ PyObject *PyErr_SetFromWindowsErrWithUnicodeFilename(
PyObject *result = PyErr_SetExcFromWindowsErrWithFilenameObject(
PyExc_WindowsError,
ierr, name);
- Py_XDECREF(result);
+ Py_XDECREF(name);
return result;
}
#endif /* Py_WIN_WIDE_FILENAMES */