We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78f8087 commit b1c9d56Copy full SHA for b1c9d56
1 file changed
Modules/_winapi.c
@@ -3114,12 +3114,11 @@ _winapi_GetProcessMemoryInfo_impl(PyObject *module, HANDLE handle)
3114
do { \
3115
PyObject *obj = PyLong_FromSize_t(pmc.ATTR); \
3116
if (obj == NULL) { \
3117
- Py_DECREF(result); \
3118
- return NULL; \
+ goto error; \
3119
} \
3120
if (PyDict_SetItemString(result, #ATTR, obj) < 0) { \
3121
Py_DECREF(obj); \
3122
3123
3124
3125
} while (0)
@@ -3135,6 +3134,10 @@ _winapi_GetProcessMemoryInfo_impl(PyObject *module, HANDLE handle)
3135
3134
ADD(PeakPagefileUsage);
3136
3137
return result;
+
3138
+error:
3139
+ Py_DECREF(result);
3140
+ return NULL;
3141
}
3142
3143
0 commit comments