mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Fixed potential crash: v can be NULL here, so use Py_XDECREF rather than Py_DECREF
This commit is contained in:
parent
edd179ee77
commit
bbfd859521
1 changed files with 1 additions and 1 deletions
|
@ -78,7 +78,7 @@ Py_InitModule4(char *name, PyMethodDef *methods, char *doc,
|
|||
if (doc != NULL) {
|
||||
v = PyString_FromString(doc);
|
||||
if (v == NULL || PyDict_SetItemString(d, "__doc__", v) != 0) {
|
||||
Py_DECREF(v);
|
||||
Py_XDECREF(v);
|
||||
return NULL;
|
||||
}
|
||||
Py_DECREF(v);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue