diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-06-12 09:15:45 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-12 09:15:45 (GMT) |
commit | 0b305e8d36c5ac5dc83f0c09e7e2b3360b992eea (patch) | |
tree | b775bc9699d79b71bae097c717356144eb9e493a | |
parent | d310fc776ee4ba94a5128bd3c22a7904f6546470 (diff) | |
download | cpython-0b305e8d36c5ac5dc83f0c09e7e2b3360b992eea.zip cpython-0b305e8d36c5ac5dc83f0c09e7e2b3360b992eea.tar.gz cpython-0b305e8d36c5ac5dc83f0c09e7e2b3360b992eea.tar.bz2 |
[3.12] gh-105673: Fix uninitialized warning in sysmodule.c (GH-105674) (#105675)
In sys_add_xoption(), 'value' may be uninitialized for some error paths.
(cherry picked from commit a8d69fe92c65d636fc454cfb1825c357eb2e6325)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
-rw-r--r-- | Python/sysmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c index a05bdf0..b8254f4 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -3371,7 +3371,7 @@ err_occurred: static int sys_add_xoption(PyObject *opts, const wchar_t *s) { - PyObject *name, *value; + PyObject *name, *value = NULL; const wchar_t *name_end = wcschr(s, L'='); if (!name_end) { |