summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-06-12 09:13:03 (GMT)
committerGitHub <noreply@github.com>2023-06-12 09:13:03 (GMT)
commit171aa086f27e581bfcf2288d5afd0167480ef3cb (patch)
tree89ace1ef0fc56ddf834bd4d377c14f641010c3a6 /Python/sysmodule.c
parente5fe017143bd259ec3a825029e3a6e30f612089c (diff)
downloadcpython-171aa086f27e581bfcf2288d5afd0167480ef3cb.zip
cpython-171aa086f27e581bfcf2288d5afd0167480ef3cb.tar.gz
cpython-171aa086f27e581bfcf2288d5afd0167480ef3cb.tar.bz2
[3.11] gh-105673: Fix uninitialized warning in sysmodule.c (GH-105674) (#105676)
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>
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r--Python/sysmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 84f1738..6e9ec90 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -3020,7 +3020,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) {