Bug report
Bug description:
The code below should call Py_DECREF(v); before returning NULL:
|
str_path = _get_tcl_lib_path(); |
|
if (str_path == NULL && PyErr_Occurred()) { |
|
return NULL; |
|
} |
|
if (str_path != NULL) { |
|
utf8_path = PyUnicode_AsUTF8String(str_path); |
|
if (utf8_path == NULL) { |
|
return NULL; |
|
} |
The code below shouldn't overwrite the pointer tcl_library_path directly:
|
tcl_library_path = PyUnicode_FromString("\\tcl\\tcl" TCL_VERSION); |
|
if (tcl_library_path == NULL) { |
|
Py_DECREF(prefix); |
|
return NULL; |
|
} |
|
tcl_library_path = PyUnicode_Concat(prefix, tcl_library_path); |
I will submit a PR.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Windows
Linked PRs
Bug report
Bug description:
The code below should call
Py_DECREF(v);before returning NULL:cpython/Modules/_tkinter.c
Lines 708 to 716 in 0066fd7
The code below shouldn't overwrite the pointer
tcl_library_pathdirectly:cpython/Modules/_tkinter.c
Lines 131 to 136 in 0066fd7
I will submit a PR.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Windows
Linked PRs
_tkinter.con Windows. #151340