From 8cc18517173d5f1ab73a4b754427456ccb132059 Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Mon, 12 Jun 2023 11:47:56 +0300 Subject: [PATCH] gh-105673: Fix uninitialized warning in sysmodule.c (GH-105674) In sys_add_xoption(), 'value' may be uninitialized for some error paths. (cherry picked from commit a8d69fe92c65d636fc454cfb1825c357eb2e6325) Co-authored-by: Nikita Sobolev --- Python/sysmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 84f17389559cf6..6e9ec90c9d1c3e 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -3020,7 +3020,7 @@ _PySys_InitCore(PyThreadState *tstate, PyObject *sysdict) 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) {