From: Nikita Sobolev Date: Mon, 12 Jun 2023 08:47:56 +0000 (+0300) Subject: gh-105673: Fix uninitialized warning in sysmodule.c (#105674) X-Git-Tag: v3.13.0a1~1787 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a8d69fe92c65d636fc454cfb1825c357eb2e6325;p=thirdparty%2FPython%2Fcpython.git gh-105673: Fix uninitialized warning in sysmodule.c (#105674) In sys_add_xoption(), 'value' may be uninitialized for some error paths. --- diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 90e5e65dcf9f..f5d4711b0c2c 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -3375,7 +3375,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) {